DavidNorgren

Untitled

Jan 13th, 2015
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. SELECT a.topic_id, a.topic_forum, a.topic_title, (SELECT count(*) FROM a) as amount
  2. FROM (
  3. SELECT topic.id AS topic_id, topic.forum AS topic_forum, topic.title AS topic_title, parent as forum_parent
  4. FROM topic
  5. LEFT JOIN forumparents ON topic.forum = forumparents.forum
  6. ) a
Advertisement
Add Comment
Please, Sign In to add comment