Wed, 05 Dec 2018 22:47:19 +0100
Fixes and improvements for hops editing and calculations.
61 | 1 | <?php |
2 | require_once('config.php'); | |
3 | ||
4 | $query = "SELECT * FROM inventory_yeasts ORDER BY name"; | |
5 | $connect = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); | |
6 | if (! $connect) { | |
7 | echo "[]"; | |
8 | return; | |
9 | } | |
10 | $result = mysqli_query($connect, $query); | |
11 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { | |
12 | $yeasts[] = array( | |
13 | 'record' => $row['record'], | |
14 | 'name' => $row['name'], | |
15 | 'type' => $row['type'], | |
16 | 'form' => $row['form'], | |
17 | 'laboratory' => $row['laboratory'], | |
18 | 'product_id' => $row['product_id'], | |
19 | 'min_temperature' => $row['min_temperature'], | |
20 | 'max_temperature' => $row['max_temperature'], | |
21 | 'attenuation' => $row['attenuation'], | |
22 | 'inventory' => $row['inventory'], | |
23 | 'cost' => $row['cost'] | |
24 | ); | |
25 | } | |
26 | echo json_encode($yeasts); |