On Sun,  9 Sep 2001 13:34, Dana Holt wrote:
> I have a query that uses a LEFT JOIN, but the two tables have some
> columns with the same name. How can I tell the columns from each table
> apart? It seems that the "joined" table overwrites the values from the
> other table.
>
> Anyone know?
>
> Thanks.
>
> --
> Dana Holt / [EMAIL PROTECTED]

Describe them as tablename.fieldname and you may want to alias them so 
you can differentiate in PHP. For example, if you have tables 'person' 
and 'place', both with a field 'description', you could use something like

SELECT person.description AS pdesc, place.description AS wdesc FROM 
person, place WHERE ....

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   "I was the first to climb Mount Everest," said Tom hilariously.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to