Kanske en funktion eller en do..while loop kan vara på sin plats? Proof of concept:
function menuQuery($id)
{
$query = "SELECT * FROM site_menu WHERE Menu_ParentID = $id";
if ($query) {
foreach($query AS $q) {
//run through the results
menuQuery($q->id);
}
}
}
//initial call of top level menu items
menuQuery(0);