www/upl_yeasts.php

changeset 785
aa79acfdf8a9
parent 311
f6fafccd8a6d
--- a/www/upl_yeasts.php	Sun Feb 06 20:06:46 2022 +0100
+++ b/www/upl_yeasts.php	Thu Feb 10 22:15:10 2022 +0100
@@ -51,8 +51,9 @@
 
 foreach ($yeasts->YEAST as $yeast) {
 
-	$sql  = "INSERT INTO inventory_yeasts SET name='" . mysqli_real_escape_string($db, $yeast->NAME);
-
+	$uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid'));
+	$sql  = "INSERT INTO inventory_yeasts SET uuid='" . $uuid;
+	$sql .= "', name='" . mysqli_real_escape_string($db, $yeast->NAME);
 	if ($yeast->TYPE == 'Lager')
 		$sql .= "', type='0";
 	else if ($yeast->TYPE == 'Ale')

mercurial