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:
@@ -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'];
|
||||
|
||||
|
Reference in New Issue
Block a user