www/includes/db_inventory_equipments.php

changeset 37
9362eb9e9e5b
parent 27
d702a41a7021
child 77
a9f8de2d7b2b
equal deleted inserted replaced
36:4b829f689d7e 37:9362eb9e9e5b
7 if (! $connect) { 7 if (! $connect) {
8 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); 8 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
9 } 9 }
10 10
11 // get data and store in a json array 11 // get data and store in a json array
12 $query = "SELECT * FROM inventory_equipments"; 12 $query = "SELECT * FROM inventory_equipments ORDER BY name";
13 if (isset($_GET['insert'])) { 13 if (isset($_GET['insert'])) {
14 // INSERT COMMAND 14 // INSERT COMMAND
15 $sql = "INSERT INTO `inventory_equipments` SET name='" . mysqli_real_escape_string($connect, $_GET['name']); 15 $sql = "INSERT INTO `inventory_equipments` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
16 $sql .= "', boil_size='" . $_GET['boil_size']; 16 $sql .= "', boil_size='" . $_GET['boil_size'];
17 $sql .= "', tun_volume='" . $_GET['tun_volume']; 17 $sql .= "', tun_volume='" . $_GET['tun_volume'];

mercurial