Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.23 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                 SELECT p.*, u.first_name, u.last_name,
  2.                 (SELECT count(*) from ppi_blog_comment WHERE post_id = ppi_blog.id) num_comments
  3.                 FROM ppi_blog p
  4.                         LEFT JOIN users u ON u.id = p.user_id
  5.                 WHERE (published = 1)
  6.                 ORDER BY created DESC