From 47d48587536c7d8175eaa05348dbc8dc804b248f Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sat, 29 Jan 2022 13:13:47 +0100 Subject: [PATCH] SQL Bugfix when prefix is in use --- chat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat.php b/chat.php index 83aaabd..719dbdc 100644 --- a/chat.php +++ b/chat.php @@ -1921,7 +1921,7 @@ function view_publicnotes(){ $dateformat = get_setting('dateformat'); print_start('publicnotes'); echo "

$I[publicnotes]

"; - $query = $db->query('SELECT notes.lastedited, notes.editedby, notes.text FROM ' . PREFIX . 'notes INNER JOIN (SELECT MAX(id) AS latest FROM notes WHERE type=3 GROUP BY editedby) AS t ON t.latest = notes.id;'); + $query = $db->query('SELECT lastedited, editedby, text FROM ' . PREFIX . 'notes INNER JOIN (SELECT MAX(id) AS latest FROM ' . PREFIX . 'notes WHERE type=3 GROUP BY editedby) AS t ON t.latest = id;'); while($result = $query->fetch(PDO::FETCH_OBJ)){ if (!empty($result->text)) { if(MSGENCRYPTED){