From 107dd60cd89e2c085040ccef06837707d0fee597 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 22 Dec 2024 09:56:29 +0000 Subject: [PATCH] fixing small bug --- sys0-code/api/fetch_printer_data.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys0-code/api/fetch_printer_data.php b/sys0-code/api/fetch_printer_data.php index b7a88b9..0123d2e 100644 --- a/sys0-code/api/fetch_printer_data.php +++ b/sys0-code/api/fetch_printer_data.php @@ -101,8 +101,9 @@ while (mysqli_stmt_fetch($stmt)) { $printer["view"]=5; //insert into db that this one is printing $sql="UPDATE printer SET system_status=99 WHERE id = $printer_id"; - $stmt = mysqli_prepare($link, $sql); - mysqli_stmt_execute($stmt); + $stmt2 = mysqli_prepare($link, $sql); + mysqli_stmt_execute($stmt2); + mysqli_stmt_close($stmt2); }else{ $printer["print_status"]="Bereit"; $printer["view"]=3;