www/includes/db_inventory_yeasts.php

changeset 313
9f45d09c2071
parent 296
69fadd1aded2
child 512
4451af8b6295
equal deleted inserted replaced
312:ec26ad6ff509 313:9f45d09c2071
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 .= "', cells='" . floatval($_POST['cells']) * 1000000000.0; 34 $sql .= "', cells='" . floatval($_POST['cells']) * 1000000000.0;
35 $sql .= "', tolerance='" . $_POST['tolerance'];
35 $sql .= "', inventory='" . $_POST['inventory']; 36 $sql .= "', inventory='" . $_POST['inventory'];
36 $sql .= "', cost='" . $_POST['cost'] . "'"; 37 $sql .= "', cost='" . $_POST['cost'] . "'";
37 if ($_POST['production_date'] == '') 38 if ($_POST['production_date'] == '')
38 $sql .= ", production_date=NULL"; 39 $sql .= ", production_date=NULL";
39 else 40 else
95 'max_reuse' => $row['max_reuse'], 96 'max_reuse' => $row['max_reuse'],
96 'inventory' => $row['inventory'], 97 'inventory' => $row['inventory'],
97 'cost' => $row['cost'], 98 'cost' => $row['cost'],
98 'production_date' => $row['production_date'], 99 'production_date' => $row['production_date'],
99 'tht_date' => $row['tht_date'], 100 'tht_date' => $row['tht_date'],
100 'cells' => floatval($row['cells']) / 1000000000.0 101 'cells' => floatval($row['cells']) / 1000000000.0,
102 'tolerance' => $row['tolerance']
101 ); 103 );
102 } 104 }
103 header("Content-type: application/json"); 105 header("Content-type: application/json");
104 echo json_encode($yeasts); 106 echo json_encode($yeasts);
105 } 107 }

mercurial