I have the following SQL statement which runs fine as a raw SQL query. But when I put it into my PHP script I can't seem to access the u_owned_by.full_name element.
Here is my SQL statement:
select t.created_on_date, t.check_status_on_date, t.due_on_date, t.id, t.title, u_owned_by.full_name, u_assigned_to.full_name, c_category.category, s_subcategory.subcategory, t.description, t.comments
from ralph_Tasks t, ralph_Cat c, ralph_Sub s
left join ralph_Users u_owned_by on u_owned_by.id = t.owned_by
left join ralph_Users u_assigned_to on u_assigned_to.id = t.assigned_to
left join ralph_Cat c_category on c_category.id = t.category
left join ralph_Sub s_subcategory on s_subcategory.id = t.subcategory;
Here is my PHP part:
while ($php_row = mysql_fetch_object($php_resultID))
<?php echo $php_row->u_owned_by.full_name?>
All I see on the web page is 'full_name' instead of the actual name I see when I run the SQL query. So, I guess I don't have the php access part right.