Sat, 19 Aug 2023 15:11:35 +0200
De iSpindel plato berekening is in het webscript gezet omdat er dan met meer cijfers achter de komman gerekend wordt. De uitkomst verschilt 0.25 plato! De calibratie is nu dus extern.
61 | 1 | <?php |
2 | require_once('config.php'); | |
3 | ||
771
9856238e9217
More efficient code for get*sources.php form dropdown lists.
Michiel Broek <mbroek@mbse.eu>
parents:
726
diff
changeset
|
4 | $query = "SELECT record,name,type,form,laboratory,product_id,min_temperature,max_temperature,flocculation,attenuation,cells,inventory,cost,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide,gr_hl_lo,sg_lo,gr_hl_hi,sg_hi FROM inventory_yeasts ORDER BY laboratory,product_id,name"; |
61 | 5 | $connect = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
6 | if (! $connect) { | |
7 | echo "[]"; | |
8 | return; | |
9 | } | |
705
d77b723f7b35
Make sure enumerated values are not empty in database updates. On several data queries set the database connection to UTF-8.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
10 | mysqli_set_charset($connect, "utf8"); |
61 | 11 | $result = mysqli_query($connect, $query); |
12 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { | |
771
9856238e9217
More efficient code for get*sources.php form dropdown lists.
Michiel Broek <mbroek@mbse.eu>
parents:
726
diff
changeset
|
13 | $yeasts[] = $row; |
61 | 14 | } |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
15 | header("Content-type: application/json"); |
61 | 16 | echo json_encode($yeasts); |