www/crontasks.php

Mon, 18 Feb 2019 22:07:12 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 18 Feb 2019 22:07:12 +0100
changeset 278
dc22dd5d77fd
parent 257
62e294ab94f5
child 294
1e09d1d102a8
permissions
-rw-r--r--

Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.

<?php

require_once('config.php');

$mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
$query = "UPDATE products SET stage=7 WHERE stage = 6 AND DATEDIFF(CURDATE(), package_date) > 0";
$result = $mysqli->query($query);

$query = "UPDATE products SET stage=8 WHERE stage = 7 AND DATEDIFF(CURDATE(), package_date) > 13";
$result = $mysqli->query($query);

$query = "UPDATE products SET stage=9 WHERE stage = 8 AND DATEDIFF(CURDATE(), package_date) > 41";
$result = $mysqli->query($query);

mercurial