The query has a number of joins and it was selecting * from all the
tables, so it was not apparent where each 'id' field was from.  It was
just a poorly written query all around. I've fixed the problem by
narrowing down the number of fields it selects and giving the ambiguous
fields specific names (ads.id as adid).

Thanks,
-Ryan

Rhino wrote:
> I don't understand what you want. If you have the original
> query, it should be apparent from it where each 'id' column
> originated. If you're not sure how to read the query, post it
> and we can help you figure out which table provided each 'id' column.
> 
> --
> Rhino
> 
> ----- Original Message -----
> From: "Ryan Stille" <[EMAIL PROTECTED]>
> To: <mysql@lists.mysql.com>
> Sent: Thursday, March 02, 2006 12:42 PM
> Subject: Want mysql to return tablename.fieldname format
> 
> 
> 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



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to