Sat, 15 Dec 2018 21:27:01 +0100
During hops load an extra weight in grams field is generated for the grid. Edit the amount is done on the weight field and the amount field is updated too. During save to the database the extra field is removed.
4 | 1 | <?php |
2 | ||
3 | require_once('config.php'); | |
4 | ||
5 | if (isset($_GET["uuid"])) | |
6 | $uuid = $_GET["uuid"]; | |
7 | else | |
8 | $uuid = "'ef166f25-1bb4-4bef-b112-a867af77f766'"; | |
9 | ||
10 | ||
11 | $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); | |
43
dcb9ff8846fa
Renamed monitor database tables
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
12 | $query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid.""; |
4 | 13 | $result = $mysqli->query($query); |
14 | $resultArray = $result->fetch_array(MYSQLI_ASSOC); | |
7
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
15 | if ($resultArray['online'] == 'Y') { |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
16 | $resultArray['online'] = true; |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
17 | } else { |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
18 | $resultArray['online'] = false; |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
19 | } |
4 | 20 | echo json_encode($resultArray); |