I'm running a query in php/mysql that joins several tables and I'm trying to display the results on my page. My problem is that all tables have the same field names, leading to an abgitious name problem when I try to display the content as:
echo $row_result['name']; // this would be i.e. the name of the product but I also have another table 'descriptions' in which I also have a field 'name'
I tried echoing $row_result['table_name.field_name'] but this won't work.
Is there another way, apart from using select description.name as prodDescription etc?
Hope you can make sence of the above, I wrote it in a hurry!
print_ron the returned array to see what values are being returned. If you only have 1namevalue returned, then chances are the latter is overwriting the first and your only option, as Chris pointed out, is using theASkeyword or running two separate queries (theASkeyword is a far better choice). Any particular reason you don't want to use theASkeyword? As that is kind of the whole point of it...