On Wed, 2007-01-24 at 20:44 -0600, Larry Garfield wrote:
> On Wednesday 24 January 2007 8:07 pm, Robert Cummings wrote:
> 
> > There is no way in hell one long line of SQL is easier to read than
> > formatted SQL that clearly delineates the clause structure.
> 
> Sure there is.  If it's a very simple SQL statement.
> 
> I have at various times done all of the following, depending on the 
> complexity 
> of the statement in question:
> 
> SELECT id, foo, FROM foo_table WHERE id=5
> 
> (Too short to really bother with splitting up.)
> 
> SELECT id, foo, bar, baz
> FROM foo_table
>   INNER JOIN bar_table on a=b
>   LEFT OUTER JOIN baz_table on b=c
> WHERE blah
>   AND stuff < narf
>   OR (thingie AND other)
> ORDER BY foo
> 
> SELECT a.a, a.b, a.c
>     b.d, b.e, b.f
>   FROM a
>     INNER JOIN b ON whatever
> ORDER BY a.b, a.c DESC

I notice you formatted all of the "long" ones. That's why in my original
statement I wrote "There is no way in hell one long line". Subsequently,
I deem you to be in agreement with my point, despite the misguided
protest :B

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to