I think this is working ok (it looks like, the right stuff is showing up, in the right order).
Not real sure on inner/outer/left and what ever else type of joins, still have some reading to do.
PHP Code:
$result = mysql_query("SELECT a.ID, a.menu_id, a.submenu_title, a.display_order, b.menu_title, b.display_order FROM page_content as a JOIN menu as b ON (a.menu_id=b.ID) ORDER BY b.display_order,a.display_order",$db);
Any way here's my question, I have two fields in the tables that are named the same "display_order" and I cant figure out how to access both from this querry?
PHP Code:
$var_menu_title = $MyRow['menu_title'];
$var_submenu_title = $MyRow['submenu_title'];
$var_menu_order = $MyRow['display_order'];
I am able to get menu_title from table b, submenu_title from table a, but display_order gives me display_order for table b(menu), I would have thought that would give me display_order for table a(page_content). how would I access both display_order fields from the different tables, I would like to list both.