Public paste
asd
By: Arieh | Date: Aug 6 2007 16:36 | Format: None | Expires: never | Size: 1.25 KB | Hits: 1126

  1.                 SELECT bf2142.forum_topics.forum_id, bf2142.forum_topics.topic_id,
  2.                 bf2142.forum_topics.topic_title, bf2142.forum_topics.topic_poster,
  3.                 bf2142.forum_topics.topic_views, bf2142.forum_topics.topic_replies,
  4.                 bf2142.forum_topics.topic_last_post_id, bf2142.forum_topics.topic_time,
  5.                 users1.id as topic_author_id, users1.username as topic_author_username,
  6.                 users2.id as last_post_author_id, users2.username as last_post_author_username
  7.                 FROM bf2142.forum_topics, gc.users as users1, gc.users as users2
  8.                 WHERE EXISTS (
  9.                     SELECT bf2142.forum_posts.post_id
  10.                     FROM bf2142.forum_posts
  11.                     WHERE (
  12.                         bf2142.forum_posts.topic_id = bf2142.forum_topics.topic_id
  13.                         AND bf2142.forum_posts.post_time >= 1186228133
  14.                     )
  15.                 )
  16.                 AND users1.id = bf2142.forum_topics.topic_poster
  17.                 AND users2.id = (
  18.                     SELECT bf2142.forum_posts.poster_id
  19.                     FROM bf2142.forum_posts
  20.                     WHERE bf2142.forum_topics.topic_last_post_id = bf2142.forum_posts.post_id
  21.                 )