10 |
10 |
11 $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
11 $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
12 $query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid.""; |
12 $query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid.""; |
13 $result = $mysqli->query($query); |
13 $result = $mysqli->query($query); |
14 $resultArray = $result->fetch_array(MYSQLI_ASSOC); |
14 $resultArray = $result->fetch_array(MYSQLI_ASSOC); |
15 if ($resultArray['online'] == 'Y') { |
|
16 $resultArray['online'] = 1; |
|
17 } else { |
|
18 $resultArray['online'] = 0; |
|
19 } |
|
20 header("Content-type: application/json"); |
15 header("Content-type: application/json"); |
21 echo json_encode($resultArray); |
16 echo json_encode($resultArray); |