Код: Выделить всё
SELECT ts.topic_id, ts.forum_id, ts.topic_title, ps.topic_id, ps.post_id
FROM forum.phpbb_topics as ts
LEFT JOIN forum.phpbb_posts as ps
ON ts.topic_id = ps.topic_id
ORDER BY ts.topic_id DESC LIMIT 7
Код: Выделить всё
SELECT ts.topic_id, ts.forum_id, ts.topic_title, ps.topic_id, ps.post_id
FROM forum.phpbb_topics as ts
LEFT JOIN forum.phpbb_posts as ps
ON ts.topic_id = ps.topic_id
ORDER BY ts.topic_id DESC LIMIT 7
Код: Выделить всё
SELECT *
FROM phpbb_topics
WHERE topic_moved_id = 0
AND topic_visibility = 1
ORDER BY topic_id DESC
LIMIT 7
ON ts.topic_id = ps.topic_id
=> USING (topic_id)