summary refs log tree commit diff stats
path: root/pages/season.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/season.php')
-rwxr-xr-xpages/season.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/pages/season.php b/pages/season.php index 74568a0..f47ab13 100755 --- a/pages/season.php +++ b/pages/season.php
@@ -2,9 +2,11 @@
2 2
3if (is_numeric($_GET['season'])) 3if (is_numeric($_GET['season']))
4{ 4{
5 $getseason = "SELECT * FROM seasons WHERE season_id = " . $_GET['season']; 5 $getseason = $mysql_conn->prepare("SELECT * FROM seasons WHERE season_id = ?");
6 $getseason2 = mysql_query($getseason); 6 $getseason->bind_param("i", $_GET['season']);
7 $getseason3 = mysql_fetch_array($getseason2); 7 $getseason->execute();
8 $getseason2 = $getseason->get_result();
9 $getseason3 = $getseason2->fetch_assoc();
8} 10}
9 11
10if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season'])) 12if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season']))
@@ -18,13 +20,16 @@ if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season']))
18 20
19if (!is_null($getseason3['last_comic_id'])) 21if (!is_null($getseason3['last_comic_id']))
20{ 22{
21 $getcomics = "SELECT * FROM comics WHERE status = \"publish\" AND comic_id >= " . $getseason3['first_comic_id'] . " AND comic_id <= " . $getseason3['last_comic_id'] . " ORDER BY comic_id ASC"; 23 $getcomics = $mysql_conn->prepare("SELECT * FROM comics WHERE status = \"publish\" AND comic_id >= ? AND comic_id <= ? ORDER BY comic_id ASC");
24 $getcomics->bind_param("ii", $getseason3["first_comic_id"], $getseason3["last_comic_id"]);
22} else { 25} else {
23 $getcomics = "SELECT * FROM comics WHERE status = \"publish\" AND comic_id >= " . $getseason3['first_comic_id'] . " ORDER BY comic_id ASC"; 26 $getcomics = $mysql_conn->prepare("SELECT * FROM comics WHERE status = \"publish\" AND comic_id >= ? ORDER BY comic_id ASC");
27 $getcomics->bind_param("i", $getseason3["first_comic_id"]);
24} 28}
25 29
26$getcomics2 = mysql_query($getcomics); 30$getcomics->execute();
27while ($getcomics3 = mysql_fetch_array($getcomics2)) 31$getcomics2 = $getcomics->get_result();
32foreach ($getcomics2 as $getcomics3)
28{ 33{
29?> <LI><A HREF="/comic<?php echo($getcomics3['comic_id']); ?>.htm"><?php echo($getcomics3['title']); ?></A></LI> 34?> <LI><A HREF="/comic<?php echo($getcomics3['comic_id']); ?>.htm"><?php echo($getcomics3['title']); ?></A></LI>
30<?php 35<?php