Msg#: 4189979 posted 7:29 pm on Aug 20, 2010 (gmt 0)
Having linked a few tables together I have come across issues where field names are the same, when using mysql_fetch_assoc(). I have a query which collects all the data from three tables, to list the articles in each category relative to their Category ID and User ID.
The User Table includes the fields: 'user_group_id' and 'user_category_id', and the Group and Category tables include the same field names where approprate. However, I am unable to declare which table I want to pick information up from, when using mysql_fetch_assoc() to prepare the fields for echo'ing later on (user_category_name and user_group_name). Is there a way to do this without having to change the field names to be unique?
Just calling the table in the query results in all fields being duplicated on the page, depending on the the amount of catagories there are in the Category Table. Sadly the following doesn't work:
$variable = ['table.field'];
Thanks in advance. :)
[edited by: Sp4rkyM4rk at 7:38 pm (utc) on Aug 20, 2010]