Include connection parameter when calling mysqli_query

This commit is contained in:
Kienan Stewart 2018-05-17 17:57:32 -04:00
parent 29a213cc26
commit be8edc140d
1 changed files with 2 additions and 2 deletions

View File

@ -53,9 +53,9 @@ if (mysqli_errno($co)) {
return 1; return 1;
} }
while ($c=mysqli_fetch_array($r)) { 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)) { 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;");
} }
} }