done with preparing list sql statements

This commit is contained in:
Tim Krehan 2019-05-22 09:12:09 +02:00
parent 8515304423
commit 04c9776a65

View file

@ -60,7 +60,9 @@
function check($id, $status){ function check($id, $status){
include $_SESSION["docroot"].'/config/config.php'; include $_SESSION["docroot"].'/config/config.php';
include $_SESSION["docroot"].'/php/connect.php'; include $_SESSION["docroot"].'/php/connect.php';
$mysqli->query("UPDATE `Einkauf` SET `Erledigt` = $status WHERE `Einkauf`.`ID` = $id"); $updateQuery = $mysqli->prepare("UPDATE `Einkauf` SET `Erledigt` = $status WHERE `Einkauf`.`ID` = ?");
$updateQuery->bind_param("s", $id);
$updateQuery->execute();
$mysqli->close(); $mysqli->close();
} }