I have 13 tables that are linked with the field called "AppId".
There are more than 40 fields that I want to retrieve from these tables at once.
I have no problem retrieving necessary data, but here is the problem.
$query = "SELECT * FROM table1, table2, ....WHERE table1.AppId = table2.AppId AND .....";
$result = mysql_query($query);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
After this, I want to display the value of the $row.
Usually, I do
echo $row[0]
or
echo $row['fieldname']
But there are over 40 fields retrieved and I want to display in certain order that I specify. (not the array order)
Therefore, it doesn't make sense to use number to specify which array members to be displayed.
But also, if I use fieldname, it doesn't work since I need to use qualifier.
I tried
$row['fieldname']
and
$row['tablename.fieldname']
But neither worked.
Does anybody know how to display array members, which belong to multiple tables?