www/includes/db_inventory_hops.php

changeset 77
a9f8de2d7b2b
parent 37
9362eb9e9e5b
child 196
531d5458782f
equal deleted inserted replaced
76:804d45bdaa86 77:a9f8de2d7b2b
7 #Connect to the database 7 #Connect to the database
8 $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); 8 $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME);
9 if (! $connect) { 9 if (! $connect) {
10 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); 10 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
11 } 11 }
12 mysqli_set_charset($connect, "utf8" );
12 13
13 // get data and store in a json array 14 // get data and store in a json array
14 $query = "SELECT * FROM inventory_hops ORDER BY origin,name"; 15 $query = "SELECT * FROM inventory_hops ORDER BY origin,name";
15 if (isset($_GET['insert'])) { 16 if (isset($_GET['insert'])) {
16 // INSERT COMMAND 17 // INSERT COMMAND

mercurial