My first two while loop are working now but when i add the 3 one for the following level i get another error :
Database query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Level 1 - Works
$parentpage_set = mysql_query("SELECT * FROM parentpages", $connection);
if (!$parentpage_set) {die("Database query failed: " . mysql_error()); }
echo "<ul class=\"subjects\">";
while ($parentpage = mysql_fetch_array($parentpage_set)) {echo "<li>{$parentpage["menu_name"]}</li>";
echo "</ul>";
Level 2 - works
$childpage_set = mysql_query("SELECT * FROM childpages WHERE parentpage_id = {$parentpage["id"]}",$connection);
if (!$childpage_set) {die("Database query failed: " . mysql_error()); }
echo "<ul class=\"pages\">";
while ($childpage = mysql_fetch_array($childpage_set)) {echo "<li>{$childpage["menu_name"]}</li>"; }
echo "</ul>";
Level 3 - not working if i comment this out my query runs but when un-commented i receive an error
$subchildpage1_set = mysql_query("SELECT * FROM subchildpages1 WHERE childpage_id = {$childpage["id"]}",$connection);
if (!$subchildpage1_set) {die("Database query failed: " . mysql_error()); }
echo "<ul class=\pages\">";
while ($subchildpage1 = mysql_fetch_array($subchildpage1_set)) {echo "<li>{$subchildpage1["menu_name"]}</li>"; }
echo "</ul>";
i still have to add two more levels to my navigation - i can not pick up my mistake and i have been trying to pick it up and i have read thru a lot of questions, can some one please tell me where my mistake is please