29 $sql .= "', flocculation='" . $_POST['flocculation']; |
29 $sql .= "', flocculation='" . $_POST['flocculation']; |
30 $sql .= "', attenuation='" . $_POST['attenuation']; |
30 $sql .= "', attenuation='" . $_POST['attenuation']; |
31 $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); |
31 $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); |
32 $sql .= "', best_for='" . mysqli_real_escape_string($connect, $_POST['best_for']); |
32 $sql .= "', best_for='" . mysqli_real_escape_string($connect, $_POST['best_for']); |
33 $sql .= "', max_reuse='" . $_POST['max_reuse']; |
33 $sql .= "', max_reuse='" . $_POST['max_reuse']; |
34 $sql .= "', inventory='" . floatval($_POST['inventory']) / 1000.0; |
34 $sql .= "', cells='" . floatval($_POST['cells']) * 1000000000.0; |
|
35 $sql .= "', inventory='" . $_POST['inventory']; |
35 $sql .= "', cost='" . $_POST['cost'] . "'"; |
36 $sql .= "', cost='" . $_POST['cost'] . "'"; |
36 if ($_POST['production_date'] == '') |
37 if ($_POST['production_date'] == '') |
37 $sql .= ", production_date=NULL"; |
38 $sql .= ", production_date=NULL"; |
38 else |
39 else |
39 $sql .= ", production_date='" . $_POST['production_date'] . "'"; |
40 $sql .= ", production_date='" . $_POST['production_date'] . "'"; |
90 'flocculation' => $row['flocculation'], |
91 'flocculation' => $row['flocculation'], |
91 'attenuation' => $row['attenuation'], |
92 'attenuation' => $row['attenuation'], |
92 'notes' => $row['notes'], |
93 'notes' => $row['notes'], |
93 'best_for' => $row['best_for'], |
94 'best_for' => $row['best_for'], |
94 'max_reuse' => $row['max_reuse'], |
95 'max_reuse' => $row['max_reuse'], |
95 'inventory' => floatval($row['inventory']) * 1000.0, |
96 'inventory' => $row['inventory'], |
96 'cost' => $row['cost'], |
97 'cost' => $row['cost'], |
97 'production_date' => $row['production_date'], |
98 'production_date' => $row['production_date'], |
98 'tht_date' => $row['tht_date'] |
99 'tht_date' => $row['tht_date'], |
|
100 'cells' => floatval($row['cells']) / 1000000000.0 |
99 ); |
101 ); |
100 } |
102 } |
101 echo json_encode($yeasts); |
103 echo json_encode($yeasts); |
102 } |
104 } |
103 ?> |
105 ?> |