From 5d703ab4ea6e8ead889232ba846596b948bdb051 Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Tue, 10 Aug 2021 16:17:53 -0600 Subject: Update names of database variables --- includes/model/Post.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'includes/model/Post.php') diff --git a/includes/model/Post.php b/includes/model/Post.php index 46a0af0..f251773 100755 --- a/includes/model/Post.php +++ b/includes/model/Post.php @@ -141,7 +141,7 @@ class Post Database::get()->query("DELETE FROM posts WHERE post_id = ?", "i", $this->id); // Decrement the post count of the category - Database::get()->query("UPDATE categories SET `cat_post_count` = `cat_post_count` - '1' WHERE cat_id = ?", "i", $this->thread->category->id); + Database::get()->query("UPDATE categories SET `category_post_count` = `category_post_count` - '1' WHERE category_id = ?", "i", $this->thread->category->id); } public static function create($post_content, $post_thread, $post_category) @@ -159,11 +159,11 @@ class Post Database::get()->query($sql, "sii", $post_content, $post_thread, $user->id); // Increment the category's post count - $sql = "UPDATE categories SET `cat_post_count` = `cat_post_count` + '1' WHERE cat_id = ?;"; + $sql = "UPDATE categories SET `category_post_count` = `category_post_count` + '1' WHERE category_id = ?;"; Database::get()->query($sql, "i", $post_category); // Set the last post date of the parent thread - $sql = "UPDATE threads SET thread_date_lastpost = CONVERT_TZ(NOW(), 'SYSTEM', '+00:00') WHERE thread_id = ?;"; + $sql = "UPDATE threads SET thread_last_post_date = CONVERT_TZ(NOW(), 'SYSTEM', '+00:00') WHERE thread_id = ?;"; Database::get()->query($sql, "i", $post_thread); } -- cgit v1.2.3