Commit 7b5df11b authored by Nigel McNie's avatar Nigel McNie
Browse files

Wrap table name in {} in a query, so it has the database prefix correctly added. Fixes #2019.

parent c29d946b
......@@ -178,7 +178,7 @@ $forum->subscribe = pieform(array(
// the last post is found by taking the max id of the posts in a topic with the max post time
// taking the max id is needed because multiple posts can have the same post time
$sql = 'SELECT t.id, p1.subject, p1.body, p1.poster, p1.deleted, m.user AS moderator, COUNT(p2.id), t.closed, s.topic AS subscribed, p4.id AS lastpost, ' . db_format_tsfield('p4.ctime', 'lastposttime') . ', p4.poster AS lastposter, m2.user AS lastpostermoderator
FROM interaction_forum_topic t
FROM {interaction_forum_topic} t
INNER JOIN {interaction_forum_post} p1 ON (p1.topic = t.id AND p1.parent IS NULL)
LEFT JOIN (
SELECT m.forum, m.user
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment