diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-01-08 21:09:05 +0000 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-01-08 21:09:05 +0000 |
commit | 459e929311d8806f604c0b914ba4b37aa731fbfc (patch) | |
tree | d81247d7ee4f768c9df552df07aad6d6896047f8 /pages/season.php | |
parent | 5b892eafafb1f41bab1a20f1524cef144042e3e1 (diff) | |
download | pillowcase-master.tar.gz pillowcase-master.tar.bz2 pillowcase-master.zip |
Diffstat (limited to 'pages/season.php')
-rwxr-xr-x | pages/season.php | 19 |
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 | ||
3 | if (is_numeric($_GET['season'])) | 3 | if (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 | ||
10 | if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season'])) | 12 | if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season'])) |
@@ -18,13 +20,16 @@ if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season'])) | |||
18 | 20 | ||
19 | if (!is_null($getseason3['last_comic_id'])) | 21 | if (!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(); |
27 | while ($getcomics3 = mysql_fetch_array($getcomics2)) | 31 | $getcomics2 = $getcomics->get_result(); |
32 | foreach ($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 |