Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: application/json');
- $stazione = $_POST["stazione"];
- $date = $_POST["date"];
- $tipo = $_POST["tipo"];
- //$stazione = "2c52b90b47a39de6a0474867dffb8a20";
- //2c52b90b47a39de6a0474867dffb8a20
- //3C:61:05:1D:92:4C
- $conn = mysqli_connect("localhost", "root", "", "sensorhub");
- $sqlQuery = "CALL `sp_leggiRilevamentoMaster`('$stazione', '$tipo', '$date')";
- $result = mysqli_query($conn, $sqlQuery);
- $data = array();
- foreach ($result as $row) {
- $data[] = $row;
- }
- mysqli_close($conn);
- echo json_encode($data);
Add Comment
Please, Sign In to add comment