Re: [PHP] Join - Two Columns with the same name

2006-04-13 Thread Jochem Maas
Kevin Murphy wrote: This is probably basic, but I can't seem to find the answer. Is there a way to specify in a join a specific column when the two tables have columns with the same name? Something like: $row['table1.id'] vs $row['table2.id'] yes. http://dev.mysql.com/doc/ is a good

Re: [PHP] Join - Two Columns with the same name

2006-04-13 Thread Warren Vail
Several methods are supported by mysql, here is the one I like, select * from table1 a, table2 b where a.col1 = b.col1 In this case the a and b are aliases of table1 and table2 respectively and the notation a.col1 and b.col1 refers to column col1 in table1 and table2 respectively. You can