From f718e3747d1402f181faffa74b93e8a91cdb5ea2 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sun, 1 Jul 2018 15:46:48 +0530 Subject: [PATCH] Fix wrong function call. --- webhook.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webhook.php b/webhook.php index 0b25c30..07ddda0 100644 --- a/webhook.php +++ b/webhook.php @@ -86,10 +86,10 @@ function add_requirement() { die("Connection failed: " . $conn->connect_error); } $stmt = $conn->prepare("DELETE FROM req where id = ?;"); - $stmt->bind('s', $item_id); + $stmt->bind_param('s', $item_id); $stmt->execute(); $stmt = $conn->prepare("INSERT INTO req (id, name, quantity) VALUES (?,?,?);"); - $stmt->bind('ssi', $item_id, $item_name, $quantity); + $stmt->bind_param('ssi', $item_id, $item_name, $quantity); $stmt->execute(); $conn->close(); send_html("Added to requirements"); @@ -106,7 +106,7 @@ function deposit(){ die("Connection failed: " . $conn->connect_error); } $stmt = $conn->prepare("UPDATE req set quantity = quantity - ? where id = ?;"); - $stmt->bind('is', $item_id, $quantity); + $stmt->bind_param('is', $item_id, $quantity); $stmt->execute(); $conn->close(); send_html("Deposited!");