www/includes/db_inventory_hops.php

changeset 33
2ee6ad5d6f14
parent 30
f5ab22446aa5
child 37
9362eb9e9e5b
equal deleted inserted replaced
32:8bb369f32ef9 33:2ee6ad5d6f14
26 $sql .= "', form='" . $_GET['form']; 26 $sql .= "', form='" . $_GET['form'];
27 $sql .= "', notes='" . mysqli_real_escape_string($connect, $_GET['notes']); 27 $sql .= "', notes='" . mysqli_real_escape_string($connect, $_GET['notes']);
28 $sql .= "', origin='" . mysqli_real_escape_string($connect, $_GET['origin']); 28 $sql .= "', origin='" . mysqli_real_escape_string($connect, $_GET['origin']);
29 $sql .= "', substitutes='" . mysqli_real_escape_string($connect, $_GET['substitutes']); 29 $sql .= "', substitutes='" . mysqli_real_escape_string($connect, $_GET['substitutes']);
30 ($_GET['always_on_stock'] == 'true') ? $sql .= "', always_on_stock='1" : $sql .= "', always_on_stock='0"; 30 ($_GET['always_on_stock'] == 'true') ? $sql .= "', always_on_stock='1" : $sql .= "', always_on_stock='0";
31 $sql .= "', inventory='" . $_GET['inventory'] / 1000.0; 31 $sql .= "', inventory='" . floatval($_GET['inventory']) / 1000.0;
32 $sql .= "', cost='" . $_GET['cost']; 32 $sql .= "', cost='" . $_GET['cost'];
33 $sql .= "', production_date='" . $_GET['production_date']; 33 $sql .= "', production_date='" . $_GET['production_date'];
34 $sql .= "', tht_date='" . $_GET['tht_date']; 34 $sql .= "', tht_date='" . $_GET['tht_date'];
35 $sql .= "', total_oil='" . $_GET['total_oil']; 35 $sql .= "', total_oil='" . $_GET['total_oil'];
36 $sql .= "';"; 36 $sql .= "';";
56 $sql .= "', form='" . $_GET['form']; 56 $sql .= "', form='" . $_GET['form'];
57 $sql .= "', notes='" . mysqli_real_escape_string($connect, $_GET['notes']); 57 $sql .= "', notes='" . mysqli_real_escape_string($connect, $_GET['notes']);
58 $sql .= "', origin='" . mysqli_real_escape_string($connect, $_GET['origin']); 58 $sql .= "', origin='" . mysqli_real_escape_string($connect, $_GET['origin']);
59 $sql .= "', substitutes='" . mysqli_real_escape_string($connect, $_GET['substitutes']); 59 $sql .= "', substitutes='" . mysqli_real_escape_string($connect, $_GET['substitutes']);
60 ($_GET['always_on_stock'] == 'true') ? $sql .= "', always_on_stock='1" : $sql .= "', always_on_stock='0"; 60 ($_GET['always_on_stock'] == 'true') ? $sql .= "', always_on_stock='1" : $sql .= "', always_on_stock='0";
61 $sql .= "', inventory='" . $_GET['inventory'] / 1000.0; 61 $sql .= "', inventory='" . floatval($_GET['inventory']) / 1000.0;
62 $sql .= "', cost='" . $_GET['cost']; 62 $sql .= "', cost='" . $_GET['cost'];
63 $sql .= "', production_date='" . $_GET['production_date']; 63 $sql .= "', production_date='" . $_GET['production_date'];
64 $sql .= "', tht_date='" . $_GET['tht_date']; 64 $sql .= "', tht_date='" . $_GET['tht_date'];
65 $sql .= "', total_oil='" . $_GET['total_oil']; 65 $sql .= "', total_oil='" . $_GET['total_oil'];
66 $sql .= "' WHERE record='" . $_GET['record'] . "';"; 66 $sql .= "' WHERE record='" . $_GET['record'] . "';";
101 'form' => $row['form'], 101 'form' => $row['form'],
102 'notes' => $row['notes'], 102 'notes' => $row['notes'],
103 'origin' => $row['origin'], 103 'origin' => $row['origin'],
104 'substitutes' => $row['substitutes'], 104 'substitutes' => $row['substitutes'],
105 'always_on_stock' => $row['always_on_stock'], 105 'always_on_stock' => $row['always_on_stock'],
106 'inventory' => $row['inventory'] * 1000, 106 'inventory' => floatval($row['inventory']) * 1000.0,
107 'cost' => $row['cost'], 107 'cost' => $row['cost'],
108 'production_date' => $row['production_date'], 108 'production_date' => $row['production_date'],
109 'tht_date' => $row['tht_date'], 109 'tht_date' => $row['tht_date'],
110 'total_oil' => $row['total_oil'] 110 'total_oil' => $row['total_oil']
111 ); 111 );

mercurial