"Ryan Stille" <[EMAIL PROTECTED]> wrote on 03/02/2006 12:42:01 PM:

> I am working with an existing compilcated query someone wrote years ago.
> When I dump the data from the query to try to figure out why I'm getting
> unexpected data, I have three fields named "id".  Is there anyway to
> tell mysql to name the fields with the table name when they are
> returned, so they show up as ads.id, track.id, etc?
> 
> -Ryan
> 
> 

I am not aware of that being an option unless you provide your own aliases 
in the SELECT clause of your query.

Select c.id as "customer.id", c.name as "customer.name", ct.name as 
"contact.name"
FROM customer c
INNER JOIN contact ct
  on ct.customer_id = c.id;

Sorry!

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to