From 459e929311d8806f604c0b914ba4b37aa731fbfc Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 8 Jan 2024 21:09:05 +0000 Subject: Migrated to mysqli --- pages/archive.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'pages/archive.php') diff --git a/pages/archive.php b/pages/archive.php index c5f0f52..114062c 100755 --- a/pages/archive.php +++ b/pages/archive.php @@ -10,25 +10,21 @@ query("SELECT * FROM seasons ORDER BY season_id ASC"); +foreach ($getseasons as $getseasons3) { - $getfc = "SELECT * FROM comics WHERE comic_id = " . $getseasons3['first_comic_id']; - $getfc2 = mysql_query($getfc); - $getfc3 = mysql_fetch_array($getfc2); + $getfc = $mysql_conn->query("SELECT * FROM comics WHERE comic_id = " . $getseasons3['first_comic_id']); + $getfc3 = $getfc->fetch_assoc(); if (!is_null($getseasons3['last_comic_id'])) { - $getlc = "SELECT * FROM comics WHERE comic_id = " . $getseasons3['last_comic_id']; - $getlc2 = mysql_query($getlc); - $getlc3 = mysql_fetch_array($getlc2); + $getlc = $mysql_conn->query("SELECT * FROM comics WHERE comic_id = " . $getseasons3['last_comic_id']); + $getlc3 = $getlc->fetch_assoc(); $count = $getseasons3['last_comic_id'] - ($getseasons3['first_comic_id']-1); } else { - $getcnt = "SELECT COUNT(*) FROM comics WHERE comic_id >= " . $getseasons3['first_comic_id']; - $getcnt2 = mysql_query($getcnt); - $getcnt3 = mysql_fetch_array($getcnt2); + $getcnt = $mysql_conn->query("SELECT COUNT(*) FROM comics WHERE comic_id >= " . $getseasons3['first_comic_id']); + $getcnt3 = $getcnt->fetch_assoc(); $count = $getcnt3[0]; } -- cgit 1.4.1