mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge PR #812 branch 'bantu/ticket/10565' into develop-olympus
* bantu/ticket/10565: [ticket/10565] Add line breaks to query in order to follow coding guidelines. [ticket/10565] update_forum_tracking_info(): Remove unnecessary GROUP BY clause
This commit is contained in:
commit
3503d7f47b
1 changed files with 7 additions and 4 deletions
|
@ -1918,14 +1918,17 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = 'SELECT t.forum_id FROM ' . TOPICS_TABLE . ' t
|
$sql = 'SELECT t.forum_id
|
||||||
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')
|
FROM ' . TOPICS_TABLE . ' t
|
||||||
|
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt
|
||||||
|
ON (tt.topic_id = t.topic_id
|
||||||
|
AND tt.user_id = ' . $user->data['user_id'] . ')
|
||||||
WHERE t.forum_id = ' . $forum_id . '
|
WHERE t.forum_id = ' . $forum_id . '
|
||||||
AND t.topic_last_post_time > ' . $mark_time_forum . '
|
AND t.topic_last_post_time > ' . $mark_time_forum . '
|
||||||
AND t.topic_moved_id = 0 ' .
|
AND t.topic_moved_id = 0 ' .
|
||||||
$sql_update_unapproved . '
|
$sql_update_unapproved . '
|
||||||
AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)
|
AND (tt.topic_id IS NULL
|
||||||
GROUP BY t.forum_id';
|
OR tt.mark_time < t.topic_last_post_time)';
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
$row = $db->sql_fetchrow($result);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue