1
mirror of https://github.com/jakejarvis/spoons.git synced 2025-10-22 20:34:29 -04:00

change all database stuff to MySQLi

This commit is contained in:
2017-07-16 12:43:57 -04:00
parent c89c6821e0
commit 438a9db194
9 changed files with 139 additions and 133 deletions

View File

@@ -9,10 +9,10 @@ if(!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] == FALSE) {
include('db_connect.php');
$result = mysql_query("SELECT first, last FROM spooners WHERE spooned = 0 ORDER BY order_num") or die(mysql_error());
$result = mysqli_query($conn, "SELECT first, last FROM spooners WHERE spooned = 0 ORDER BY order_num") or die(mysqli_error($conn));
$i = 0;
while($spooner = mysql_fetch_array($result)) {
while($spooner = mysqli_fetch_array($result)) {
$spooners[$i]['name'] = $spooner['first'];
if($spooner['last']) $spooners[$i]['name'] .= " " . $spooner['last'];