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 = "'c0c17800-fabb-4f22-a02a-4f83a7b1b21b'"; | |
9 | ||
10 | ||
44 | 11 | $query = "SELECT * FROM mon_nodes WHERE uuid=".$uuid.""; |
4 | 12 | $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
13 | $result = $mysqli->query($query); | |
14 | //Copy result into a associative array | |
15 | $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
|
16 | 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
|
17 | $resultArray['online'] = true; |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
18 | } else { |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
19 | $resultArray['online'] = false; |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
20 | } |
4 | 21 | echo json_encode($resultArray); |