www/crontasks.php

changeset 419
99a7f2a6976e
parent 393
5020feba78ec
child 422
7943afc0fcde
equal deleted inserted replaced
416:0c719ea7e680 419:99a7f2a6976e
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 mysqli_set_charset($connect, "utf8" );
13 syslog(LOG_NOTICE, "crontasks.php started"); 13 syslog(LOG_NOTICE, "crontasks.php started");
14 14
15
16
17 /*
18 * Upgrade package values.
19 */
20 $query = "UPDATE products SET package_volume = bottle_amount + keg_amount WHERE package_volume='0';";
21 $result = mysqli_query($connect, $query);
22 $changed = mysqli_affected_rows($connect);
23 if ($changed > 0) {
24 syslog(LOG_NOTICE, "Updated ".$changed." products to new package_volume value");
25 }
15 26
16 27
17 /* 28 /*
18 * Upgrade inventory_reduced value from old boolean to tiny integer value. 29 * Upgrade inventory_reduced value from old boolean to tiny integer value.
19 */ 30 */

mercurial