Thread: Indenting SQL
View Single Post
Old 02-20-2008, 03:58 PM   #4 (permalink)
Pete
The Wanderer
 
Join Date: Feb 2008
Posts: 10
Thanks: 0
Pete is on a distinguished road
Default

I tend to put a tab line in and start each part of the statment on the tab line so if ofen looks like:
Code:
   $myquery=    "SELECT * FROM table
                WHERE something ='something'"
so like SOCK says but use the tab button, I like to have it in a line so its line1: selecting what, line2: criteria or results, and line3+: my orderby/sortby.

obviously if its a more complex query it changes with joins and what not but thats my basic format for queries.
Pete is offline  
Reply With Quote