From be8edc140da7eabd6ba61cadbf5f8c78b2d67d20 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 17 May 2018 17:57:32 -0400 Subject: [PATCH] Include connection parameter when calling mysqli_query --- src/quota_init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quota_init b/src/quota_init index 4013135b..1b50632c 100644 --- a/src/quota_init +++ b/src/quota_init @@ -53,9 +53,9 @@ if (mysqli_errno($co)) { return 1; } while ($c=mysqli_fetch_array($r)) { - $s=mysqli_query("SELECT name FROM quotas WHERE uid='$c[uid]' AND name='$name';"); + $s=mysqli_query($co, "SELECT name FROM quotas WHERE uid='$c[uid]' AND name='$name';"); if (!mysqli_num_rows($s)) { - mysqli_query("INSERT INTO quotas (uid,name,total) VALUES ('$c[uid]','$name','$quota') on DUPLICATE KEY UPDATE total=$quota;"); + mysqli_query($co, "INSERT INTO quotas (uid,name,total) VALUES ('$c[uid]','$name','$quota') on DUPLICATE KEY UPDATE total=$quota;"); } }