diff options
Diffstat (limited to 'category.php')
-rw-r--r-- | category.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/category.php b/category.php index b444ef3..fcc7851 100644 --- a/category.php +++ b/category.php @@ -27,21 +27,21 @@ mysqli_free_result($result); echo '</section>'; -$sql = "SELECT topic_id, topic_subject, topic_date, user_name FROM topics LEFT JOIN users ON topic_author = user_id WHERE topic_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY topic_id DESC"; +$sql = "SELECT thread_id, thread_subject, thread_date, user_name FROM threads LEFT JOIN users ON thread_author = user_id WHERE thread_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY thread_id DESC"; $result = mysqli_query($dbc, $sql); if (!$result) { - die('Error trying to display topics: ' . mysqli_error($dbc)); + die('Error trying to display threads: ' . mysqli_error($dbc)); } // Display table of posts -echo '<table><tr><th class="left">Topic</th><th class="right">Latest Post</th></tr>'; +echo '<table><tr><th class="left">Thread</th><th class="right">Latest Post</th></tr>'; while ($row = mysqli_fetch_assoc($result)) { echo '<tr><td class="left">'; - echo '<h4><a href="topic.php?id=' . $row['topic_id'] . '">' . $row['topic_subject'] . '</a></h4>'; - echo '<small>by <b>' . $row['user_name'] . '</b> on ' . date('M d, Y', strtotime($row['topic_date'])) . '</small></td><td class="right">by <b>cflip</b><br><small>01-22-2021 9:34</small></td></tr>'; + echo '<h4><a href="thread.php?id=' . $row['thread_id'] . '">' . $row['thread_subject'] . '</a></h4>'; + echo '<small>by <b>' . $row['user_name'] . '</b> on ' . date('M d, Y', strtotime($row['thread_date'])) . '</small></td><td class="right">by <b>cflip</b><br><small>01-22-2021 9:34</small></td></tr>'; } echo '</table>'; |