www/includes/db_inventory_yeasts.php

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

mercurial