Tag Archive for 'syntax'

INNER JOIN syntax

It's too bad that ON (column = column) comes after and not before INNER JOIN table, because if it came before it would make for much cuter code formatting:

SQL:
  1. SELECT DISTINCT $columns
  2. FROM
  3.   $this->comments
  4.     ON (comment_post_ID = post_id) INNER JOIN
  5.   $this->post2cat
  6.     ON (category_id = cat_ID) INNER JOIN
  7.   $this->categories
  8. WHERE
  9.   blog = '$blog' AND
  10.   $criteria




Close
Powered by ShareThis