www/includes/db_inventory_yeasts.php

changeset 725
30346e5b9e12
parent 715
8fb922c00a2d
child 767
08c0343b622b
equal deleted inserted replaced
724:66e0b4ef9268 725:30346e5b9e12
41 ($_POST['harvest_top'] == 'true') ? $sql .= "', harvest_top='1" : $sql .= "', harvest_top='0"; 41 ($_POST['harvest_top'] == 'true') ? $sql .= "', harvest_top='1" : $sql .= "', harvest_top='0";
42 $sql .= "', harvest_time='" . $_POST['harvest_time']; 42 $sql .= "', harvest_time='" . $_POST['harvest_time'];
43 $sql .= "', pitch_temperature='" . floatval($_POST['pitch_temperature']); 43 $sql .= "', pitch_temperature='" . floatval($_POST['pitch_temperature']);
44 ($_POST['pofpos'] == 'true') ? $sql .= "', pofpos='1" : $sql .= "', pofpos='0"; 44 ($_POST['pofpos'] == 'true') ? $sql .= "', pofpos='1" : $sql .= "', pofpos='0";
45 $sql .= "', zymocide='" . $_POST['zymocide']; 45 $sql .= "', zymocide='" . $_POST['zymocide'];
46 $sql .= "', gr_hl_lo='" . $_POST['gr_hl_lo'];
47 $sql .= "', sg_lo='" . floatval($_POST['sg_lo']);
48 $sql .= "', gr_hl_hi='" . $_POST['gr_hl_hi'];
49 $sql .= "', sg_hi='" . floatval($_POST['sg_hi']);
46 $sql .= "', inventory='" . $_POST['inventory']; 50 $sql .= "', inventory='" . $_POST['inventory'];
47 $sql .= "', cost='" . $_POST['cost'] . "'"; 51 $sql .= "', cost='" . $_POST['cost'] . "'";
48 if ($_POST['production_date'] == '') 52 if ($_POST['production_date'] == '')
49 $sql .= ", production_date=NULL"; 53 $sql .= ", production_date=NULL";
50 else 54 else
114 'bacteria' => $row['bacteria'], 118 'bacteria' => $row['bacteria'],
115 'harvest_top' => $row['harvest_top'], 119 'harvest_top' => $row['harvest_top'],
116 'harvest_time' => $row['harvest_time'], 120 'harvest_time' => $row['harvest_time'],
117 'pitch_temperature' => floatval($row['pitch_temperature']), 121 'pitch_temperature' => floatval($row['pitch_temperature']),
118 'pofpos' => $row['pofpos'], 122 'pofpos' => $row['pofpos'],
119 'zymocide' => $row['zymocide'] 123 'zymocide' => $row['zymocide'],
124 'gr_hl_lo' => $row['gr_hl_lo'],
125 'sg_lo' => floatval($row['sg_lo']),
126 'gr_hl_hi' => $row['gr_hl_hi'],
127 'sg_hi' => floatval($row['sg_hi'])
120 ); 128 );
121 } 129 }
122 header("Content-type: application/json"); 130 header("Content-type: application/json");
123 echo json_encode($yeasts); 131 echo json_encode($yeasts);
124 } 132 }

mercurial