From 5c0314a75d2722bb99918ef44473f4204462835a Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Wed, 14 Apr 2021 17:23:56 -0600 Subject: Add 'date edited' attribute to posts --- model/Thread.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'model/Thread.php') diff --git a/model/Thread.php b/model/Thread.php index aa48cfd..a9dc690 100644 --- a/model/Thread.php +++ b/model/Thread.php @@ -65,7 +65,7 @@ class Thread { } function get_latest_post($dbc) { - $sql = "SELECT post_id FROM posts WHERE post_thread = " . $this->id . " ORDER BY post_date DESC LIMIT 1"; + $sql = "SELECT post_id FROM posts WHERE post_thread = " . $this->id . " ORDER BY post_date_created DESC LIMIT 1"; $result = mysqli_query($dbc, $sql); if (!$result) { @@ -108,4 +108,4 @@ function get_all_threads($dbc) { mysqli_free_result($result); return $threads; -} \ No newline at end of file +} -- cgit v1.2.3