Jump to content

Getting inner join result data when column names are the same


groupbrand

Recommended Posts

I have an issue when trying to retrieve results from an inner join query where the tables queried have column names. Basically if I inner join table1 with table2 and they both contain an id field, the query results return a table1.id and table2.id (along with any other column data requested). When I run through the results using mysql_fetch_assoc I can grab any unique column data but using $row['colname'] but I cannot get data from columns that have the same name e.g. $row['table1.id'] - can anyone point me in the right direction? Thanks in advance!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.