diff -r 4082c41f45e9 -r 12aa92828e24 www/includes/db_product.php --- a/www/includes/db_product.php Sun Feb 24 22:29:00 2019 +0100 +++ b/www/includes/db_product.php Sun Feb 24 23:26:01 2019 +0100 @@ -436,6 +436,22 @@ return; } + if (isset($_GET['select']) && ($_GET['select'] == "archname")) { + $query = "SELECT record,name,code,birth,batch_size FROM products WHERE stage = '11' ORDER BY name,birth;"; + $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); + while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { + $brews[] = array( + 'record' => $row['record'], + 'name' => $row['name'], + 'code' => $row['code'], + 'birth' => $row['birth'], + 'batch_size' => $row['batch_size'] + ); + } + echo json_encode($brews, JSON_UNESCAPED_UNICODE); + return; + } + /* * SELECT, produce a list of products that can be fermented. */