[thelist] php query
Jason Handby
jasonh at pavilion.co.uk
Thu Feb 20 05:44:00 CST 2003
Liam wrote:
> Something like the following should suffice in MySQL
>
> select table2.col_name from table1, table2 where table2.reference_id =
> table1.id
Can I be really picky and recommend that you write it as
select table2.col_name from table1 INNER JOIN table2 ON
table2.reference_id=table1.id
instead? Writing your joins in ANSI-style is a good syntactic habit to get
into, and it can make complex multi-join queries much more readable.
Jason
More information about the thelist
mailing list