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.
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | require($_SERVER['DOCUMENT_ROOT']."/config.php"); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | require($_SERVER['DOCUMENT_ROOT']."/version.php"); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | #Connect to the database |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | if (! $connect) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | mysqli_set_charset($connect, "utf8" ); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
13 | $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
14 | $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
15 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | if (isset($_POST['insert']) || isset($_POST['update'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | if (isset($_POST['insert'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | $sql = "INSERT INTO `prod_main` SET "; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | if (isset($_POST['update'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | $sql = "UPDATE `prod_main` SET "; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | // Basic settings |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
25 | $sql .= "puuid='" . $_POST['puuid']; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
26 | $sql .= "', pname='" . mysqli_real_escape_string($connect, $_POST['pname']); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | $sql .= "', birth='" . $_POST['birth']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | $sql .= "', stage='" . $_POST['stage']; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
29 | $sql .= "', pnotes='" . mysqli_real_escape_string($connect, $_POST['pnotes']); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | ($_POST['log_brew'] == 'true') ? $sql .= "', log_brew='1" : $sql .= "', log_brew='0"; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | ($_POST['log_fermentation'] == 'true') ? $sql .= "', log_fermentation='1" : $sql .= "', log_fermentation='0"; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | ($_POST['inventory_reduced'] == 'true') ? $sql .= "', inventory_reduced='1" : $sql .= "', inventory_reduced='0"; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
33 | ($_POST['plocked'] == 'true') ? $sql .= "', plocked='1" : $sql .= "', plocked='0"; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | // Equipment |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | $sql .= "', eq_name='" . mysqli_real_escape_string($connect, $_POST['eq_name']); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | $sql .= "', eq_boil_size='" . $_POST['eq_boil_size']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | $sql .= "', eq_batch_size='" . $_POST['eq_batch_size']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | $sql .= "', eq_tun_volume='" . $_POST['eq_tun_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | $sql .= "', eq_tun_weight='" . $_POST['eq_tun_weight']; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
40 | $sql .= "', eq_tun_specific_heat='" . $_POST['eq_tun_specific_heat']; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
41 | $sql .= "', eq_tun_material='" . mysqli_real_escape_string($connect, $_POST['eq_tun_material']); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | $sql .= "', eq_tun_height='" . $_POST['eq_tun_height']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | $sql .= "', eq_top_up_water='" . $_POST['eq_top_up_water']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | $sql .= "', eq_trub_chiller_loss='" . $_POST['eq_trub_chiller_loss']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | $sql .= "', eq_evap_rate='" . $_POST['eq_evap_rate']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | $sql .= "', eq_boil_time='" . $_POST['eq_boil_time']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | $sql .= "', eq_calc_boil_volume='" . $_POST['eq_calc_boil_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | $sql .= "', eq_top_up_kettle='" . $_POST['eq_top_up_kettle']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | $sql .= "', eq_hop_utilization='" . $_POST['eq_hop_utilization']; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
50 | $sql .= "', eq_notes='" . mysqli_real_escape_string($connect, $_POST['eq_notes']); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
51 | $sql .= "', eq_lauter_volume='" . $_POST['eq_lauter_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | $sql .= "', eq_lauter_height='" . $_POST['eq_lauter_height']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | $sql .= "', eq_lauter_deadspace='" . $_POST['eq_lauter_deadspace']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
54 | $sql .= "', eq_kettle_volume='" . $_POST['eq_kettle_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | $sql .= "', eq_kettle_height='" . $_POST['eq_kettle_height']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | $sql .= "', eq_mash_volume='" . $_POST['eq_mash_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | $sql .= "', eq_efficiency='" . $_POST['eq_efficiency']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
58 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
59 | syslog(LOG_NOTICE, $sql); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
60 | if (isset($_POST['insert'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | $sql .= "';"; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
62 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
63 | if (isset($_POST['update'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | $sql .= "' WHERE record='" . $_POST['record'] . "';"; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
67 | |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
68 | // $result = mysqli_query($connect, $sql); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
69 | // if (! $result) { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
70 | // syslog(LOG_NOTICE, "db_product: result: ".mysqli_error($connect)); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
71 | // echo $result; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
72 | // return; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
73 | // } else { |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
74 | // if (isset($_POST['update'])) { |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
75 | // syslog(LOG_NOTICE, "db_product: updated record ".$_POST['record']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
76 | // } else { |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
77 | // $lastid = mysqli_insert_id($connect); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
78 | // syslog(LOG_NOTICE, "db_product: inserted record ".$lastid); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
79 | // } |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
80 | // } |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
81 | // echo $result; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
83 | } else if (isset($_POST['delete'])) { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
84 | /* |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
85 | * DELETE command, first delete the recipe and then the product. |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
86 | */ |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
87 | $sql = "DELETE FROM `prod_recipes` WHERE uuid='".$_POST['uuid']."';"; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
88 | $result = mysqli_query($connect, $sql); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
89 | if (! $result) { |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
90 | syslog(LOG_NOTICE, "db_product: ".$sql." result: ".mysqli_error($connect)); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
91 | } else { |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
92 | syslog(LOG_NOTICE, "db_product: deleted recipe uuid ".$_POST['uuid']); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
93 | } |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
94 | |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
95 | $sql = "DELETE FROM `prod_main` WHERE puuid='".$_POST['uuid']."';"; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
96 | $result = mysqli_query($connect, $sql); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
97 | if (! $result) { |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
98 | syslog(LOG_NOTICE, "db_product: ".$sql." result: ".mysqli_error($connect)); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
99 | } else { |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
100 | syslog(LOG_NOTICE, "db_product: deleted product uuid ".$_POST['uuid']); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
101 | } |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
102 | echo $result; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
103 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
104 | } else { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
105 | /* |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
106 | * SELECT, produce a list of products that are not yet Closed. |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
107 | */ |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
108 | if (isset($_GET['select']) && ($_GET['select'] == "inprod")) { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
109 | $query = "SELECT record,pname,code,birth,stage FROM prod_main WHERE stage != 'Closed' ORDER BY birth,code;"; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
110 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
111 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
112 | $brews[] = array( |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
113 | 'record' => $row['record'], |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
114 | 'pname' => $row['pname'], |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
115 | 'code' => $row['code'], |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
116 | 'birth' => $row['birth'], |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
117 | 'stage' => $row['stage'] |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
118 | ); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
119 | } |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
120 | echo json_encode($brews); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
121 | return; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
122 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
123 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
124 | /* |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
125 | * Default, select all or a given record. |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
126 | */ |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
127 | if (isset($_GET['record'])) { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
128 | $query = "SELECT * FROM prod_main LEFT JOIN prod_recipes ON puuid = uuid WHERE prod_main.record='"; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
129 | $query .= $_GET['record'] . "';"; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
130 | } else { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
131 | $query = "SELECT * FROM prod_main LEFT JOIN prod_recipes ON puuid = uuid ORDER BY birth,code;"; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
132 | } |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
133 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
134 | $brews = '['; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
135 | $comma = FALSE; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
136 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
137 | // Manual encode to JSON. |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
138 | if ($comma) |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
139 | $brews .= ','; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
140 | $comma = TRUE; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
141 | $brew = '{"record":' . $row['record']; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
142 | $brew .= ',"puuid":"' . str_replace($escapers, $replacements, $row['puuid']); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
143 | $brew .= '","pname":"' . str_replace($escapers, $replacements, $row['pname']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
144 | $brew .= '","code":"' . str_replace($escapers, $replacements, $row['code']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
145 | $brew .= '","birth":"' . str_replace($escapers, $replacements, $row['birth']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
146 | $brew .= '","stage":"' . str_replace($escapers, $replacements, $row['stage']); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
147 | $brew .= '","pnotes":"' . str_replace($escapers, $replacements, $row['pnotes']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
148 | $brew .= '","log_brew":' . $row['log_brew']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
149 | $brew .= ',"log_fermentation":' . $row['log_fermentation']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
150 | $brew .= ',"inventory_reduced":' . $row['inventory_reduced']; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
151 | $brew .= ',"plocked":' . $row['plocked']; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
152 | $brew .= ',"eq_name":"' . str_replace($escapers, $replacements, $row['eq_name']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
153 | $brew .= '","eq_notes":"' . str_replace($escapers, $replacements, $row['eq_notes']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
154 | $brew .= '","eq_boil_size":' . floatval($row['eq_boil_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
155 | $brew .= ',"eq_batch_size":' . floatval($row['eq_batch_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
156 | $brew .= ',"eq_tun_volume":' . floatval($row['eq_tun_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
157 | $brew .= ',"eq_tun_weight":' . floatval($row['eq_tun_weight']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
158 | $brew .= ',"eq_tun_specific_heat":' . floatval($row['eq_tun_specific_heat']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
159 | $brew .= ',"eq_tun_material":"' . $row['eq_tun_material']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
160 | $brew .= '","eq_tun_height":' . floatval($row['eq_tun_height']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
161 | $brew .= ',"eq_top_up_water":' . floatval($row['eq_top_up_water']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
162 | $brew .= ',"eq_trub_chiller_loss":' . floatval($row['eq_trub_chiller_loss']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
163 | $brew .= ',"eq_evap_rate":' . floatval($row['eq_evap_rate']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
164 | $brew .= ',"eq_boil_time":' . floatval($row['eq_boil_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
165 | $brew .= ',"eq_calc_boil_volume":' . $row['eq_calc_boil_volume']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
166 | $brew .= ',"eq_calc_boil_volume":' . floatval($row['eq_calc_boil_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
167 | $brew .= ',"eq_top_up_kettle":' . floatval($row['eq_top_up_kettle']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
168 | $brew .= ',"eq_hop_utilization":' . floatval($row['eq_hop_utilization']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
169 | $brew .= ',"eq_lauter_volume":' . floatval($row['eq_lauter_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
170 | $brew .= ',"eq_lauter_height":' . floatval($row['eq_lauter_height']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
171 | $brew .= ',"eq_lauter_deadspace":' . floatval($row['eq_lauter_deadspace']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
172 | $brew .= ',"eq_kettle_volume":' . floatval($row['eq_kettle_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
173 | $brew .= ',"eq_kettle_height":' . floatval($row['eq_kettle_height']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
174 | $brew .= ',"eq_mash_volume":' . floatval($row['eq_mash_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
175 | $brew .= ',"eq_efficiency":' . floatval($row['eq_efficiency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
176 | $brew .= ',"eq_top_up_water":' . floatval($row['eq_top_up_water']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
177 | $brew .= ',"brew_date_start":"' . $row['brew_date_start']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
178 | $brew .= '","brew_mash_ph":' . floatval($row['brew_mash_ph']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
179 | $brew .= ',"brew_mash_sg":' . floatval($row['brew_mash_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
180 | $brew .= ',"brew_sparge_temperature":' . floatval($row['brew_sparge_temperature']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
181 | $brew .= ',"brew_sparge_volume":' . floatval($row['brew_sparge_volume']); |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
182 | $brew .= ',"brew_sparge_ph":' . floatval($row['brew_sparge_ph']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
183 | $brew .= ',"brew_preboil_volume":' . floatval($row['brew_preboil_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
184 | $brew .= ',"brew_preboil_sg":' . floatval($row['brew_preboil_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
185 | $brew .= ',"brew_preboil_ph":' . floatval($row['brew_preboil_ph']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
186 | $brew .= ',"brew_aboil_volume":' . floatval($row['brew_aboil_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
187 | $brew .= ',"brew_aboil_sg":' . floatval($row['brew_aboil_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
188 | $brew .= ',"brew_aboil_ph":' . floatval($row['brew_aboil_ph']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
189 | $brew .= ',"brew_aboil_efficiency":' . floatval($row['brew_aboil_efficiency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
190 | $brew .= ',"brew_cooling_method":"' . $row['brew_cooling_method']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
191 | $brew .= '","brew_cooling_time":' . floatval($row['brew_cooling_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
192 | $brew .= ',"brew_cooling_to":' . floatval($row['brew_cooling_to']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
193 | $brew .= ',"brew_whirlpool9":' . floatval($row['brew_whirlpool9']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
194 | $brew .= ',"brew_whirlpool7":' . floatval($row['brew_whirlpool7']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
195 | $brew .= ',"brew_whirlpool6":' . floatval($row['brew_whirlpool6']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
196 | $brew .= ',"brew_whirlpool2":' . floatval($row['brew_whirlpool2']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
197 | $brew .= ',"brew_fermenter_volume":' . floatval($row['brew_fermenter_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
198 | $brew .= ',"brew_fermenter_extrawater":' . floatval($row['brew_fermenter_extrawater']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
199 | $brew .= ',"brew_aeration_time":' . floatval($row['brew_aeration_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
200 | $brew .= ',"brew_aeration_speed":' . floatval($row['brew_aeration_speed']); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
201 | $brew .= ',"brew_aeration_type":"' . $row['brew_aeration_type']; |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
202 | $brew .= '","brew_fermenter_sg":' . floatval($row['brew_fermenter_sg']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
203 | $brew .= ',"brew_fermenter_ibu":' . floatval($row['brew_fermenter_ibu']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
204 | $brew .= ',"brew_date_end":"' . $row['brew_date_end']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
205 | $brew .= '","brew_log_available":' . $row['brew_log_available']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
206 | $brew .= ',"primary_start_temp":' . floatval($row['primary_start_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
207 | $brew .= ',"primary_max_temp":' . floatval($row['primary_max_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
208 | $brew .= ',"primary_end_temp":' . floatval($row['primary_end_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
209 | $brew .= ',"primary_end_sg":' . floatval($row['primary_end_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
210 | $brew .= ',"primary_end_date":"' . $row['primary_end_date']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
211 | $brew .= '","secondary_temp":' . floatval($row['secondary_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
212 | $brew .= ',"secondary_end_date":"' . $row['secondary_end_date']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
213 | $brew .= '","tertiary_temp":' . floatval($row['tertiary_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
214 | $brew .= ',"package_date":"' . $row['package_date']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
215 | $brew .= '","bottle_amount":' . floatval($row['bottle_amount']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
216 | $brew .= ',"bottle_carbonation":' . floatval($row['bottle_carbonation']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
217 | $brew .= ',"bottle_priming_sugar":"' . str_replace($escapers, $replacements, $row['bottle_priming_sugar']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
218 | $brew .= '","bottle_priming_amount":' . floatval($row['bottle_priming_amount']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
219 | $brew .= ',"bottle_carbonation_temp":' . floatval($row['bottle_carbonation_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
220 | $brew .= ',"keg_amount":' . floatval($row['keg_amount']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
221 | $brew .= ',"keg_carbonation":' . floatval($row['keg_carbonation']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
222 | $brew .= ',"keg_priming_sugar":"' . str_replace($escapers, $replacements, $row['keg_priming_sugar']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
223 | $brew .= '","keg_priming_amount":' . floatval($row['keg_priming_amount']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
224 | $brew .= ',"keg_carbonation_temp":' . floatval($row['keg_carbonation_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
225 | $brew .= ',"keg_forced_carb":' . floatval($row['keg_forced_carb']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
226 | $brew .= ',"keg_pressure":' . floatval($row['keg_pressure']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
227 | $brew .= ',"keg_priming_factor":' . floatval($row['keg_priming_factor']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
228 | $brew .= ',"taste_notes":"' . str_replace($escapers, $replacements, $row['taste_notes']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
229 | $brew .= '","taste_rate":' . floatval($row['taste_rate']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
230 | $brew .= ',"taste_date":"' . str_replace($escapers, $replacements, $row['taste_date']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
231 | $brew .= '","taste_color":"' . str_replace($escapers, $replacements, $row['taste_color']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
232 | $brew .= '","taste_transparency":"' . str_replace($escapers, $replacements, $row['taste_transparency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
233 | $brew .= '","taste_head":"' . str_replace($escapers, $replacements, $row['taste_head']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
234 | $brew .= '","taste_aroma":"' . str_replace($escapers, $replacements, $row['taste_aroma']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
235 | $brew .= '","taste_taste":"' . str_replace($escapers, $replacements, $row['taste_taste']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
236 | $brew .= '","taste_mouthfeel":"' . str_replace($escapers, $replacements, $row['taste_mouthfeel']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
237 | $brew .= '","taste_aftertaste":"' . str_replace($escapers, $replacements, $row['taste_aftertaste']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
238 | $brew .= '","st_guide":"' . str_replace($escapers, $replacements, $row['st_guide']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
239 | $brew .= '","st_letter":"' . str_replace($escapers, $replacements, $row['st_letter']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
240 | $brew .= '","st_name":"' . str_replace($escapers, $replacements, $row['st_name']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
241 | $brew .= '","st_type":"' . str_replace($escapers, $replacements, $row['st_type']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
242 | $brew .= '","st_category":"' . str_replace($escapers, $replacements, $row['st_category']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
243 | $brew .= '","st_category_number":' . floatval($row['st_category_number']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
244 | $brew .= ',"st_og_min":' . floatval($row['st_og_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
245 | $brew .= ',"st_og_max":' . floatval($row['st_og_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
246 | $brew .= ',"st_fg_min":' . floatval($row['st_fg_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
247 | $brew .= ',"st_fg_max":' . floatval($row['st_fg_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
248 | $brew .= ',"st_ibu_min":' . floatval($row['st_ibu_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
249 | $brew .= ',"st_ibu_max":' . floatval($row['st_ibu_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
250 | $brew .= ',"st_color_min":' . floatval($row['st_color_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
251 | $brew .= ',"st_color_max":' . floatval($row['st_color_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
252 | $brew .= ',"st_carb_min":' . floatval($row['st_carb_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
253 | $brew .= ',"st_carb_max":' . floatval($row['st_carb_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
254 | $brew .= ',"st_abv_min":' . floatval($row['st_abv_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
255 | $brew .= ',"st_abv_max":' . floatval($row['st_abv_max']); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
256 | $brew .= ',"notes":"' . str_replace($escapers, $replacements, $row['notes']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
257 | $brew .= '","type":"' . $row['type']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
258 | $brew .= '","batch_size":' . floatval($row['batch_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
259 | $brew .= ',"boil_size":' . floatval($row['boil_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
260 | $brew .= ',"boil_time":' . floatval($row['boil_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
261 | $brew .= ',"efficiency":' . floatval($row['efficiency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
262 | $brew .= ',"est_og":' . floatval($row['est_og']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
263 | $brew .= ',"est_fg":' . floatval($row['est_fg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
264 | $brew .= ',"est_abv":' . floatval($row['est_abv']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
265 | $brew .= ',"est_carb":' . floatval($row['est_carb']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
266 | $brew .= ',"est_color":' . floatval($row['est_color']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
267 | $brew .= ',"color_method":"' . $row['color_method']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
268 | $brew .= '","est_ibu":' . floatval($row['est_ibu']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
269 | $brew .= ',"ibu_method":"' . $row['ibu_method']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
270 | $brew .= '","mash_sparge_temp":' . $row['mash_sparge_temp']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
271 | $brew .= ',"mash_ph":' . $row['mash_ph']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
272 | $brew .= ',"mash_name":"' . $row['mash_name']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
273 | $brew .= '","fermentables":' . $row['json_fermentables']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
274 | $brew .= ',"hops":' . $row['json_hops']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
275 | $brew .= ',"miscs":' . $row['json_miscs']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
276 | $brew .= ',"yeasts":' . $row['json_yeasts']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
277 | $brew .= ',"waters":' . $row['json_waters']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
278 | $brew .= ',"mashs":' . $row['json_mashs']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
279 | $brew .= '}'; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
280 | $brews .= $brew; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
281 | } |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
282 | $brews .= ']'; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
283 | header("Content-type: application/json"); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
284 | echo $brews; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
285 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
286 | ?> |