www/getfermenter.php

Tue, 30 Apr 2019 16:12:09 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 30 Apr 2019 16:12:09 +0200
changeset 349
0e44535f7435
parent 296
69fadd1aded2
child 572
7a03181d29a3
permissions
-rw-r--r--

Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.

<?php

require_once('config.php');

if (isset($_GET["uuid"]))
	    $uuid = $_GET["uuid"];
else
	    $uuid = "'ef166f25-1bb4-4bef-b112-a867af77f766'";


$mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
$query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid."";
$result = $mysqli->query($query);
$resultArray = $result->fetch_array(MYSQLI_ASSOC);
if ($resultArray['online'] == 'Y') {
  $resultArray['online'] = 1;
} else {
  $resultArray['online'] = 0;
}
header("Content-type: application/json");
echo json_encode($resultArray);

mercurial