I have two tables. One is categories. The Other is subcategories. I want to categorize all the subcategories under the categories... Please look at my code and tell me what I am doing wrong. My Code at this stage.... $result = mysql_query( "SELECT * FROM ".$prefix."adcat JOIN adsubcat ON adsubcat.catid=adcat.id ORDER by sortorder,id" ) or died("Record NOT Found: ".mysql_error()); ?> <center> <div id="wrapper"> <? while ($db = mysql_fetch_array($result)) { echo "<div id =".$db[div].">".$db[name]."<br><div id=".$db[divsub].">".$db[subname]."</div></div>"; } ?> Code (markup): Please HELP???!!!
i duno whats the error u get? and i duno if this is the solution but or died("Record NOT Found: ".mysql_error()); Code (markup): shouldn't it be: or die("Record NOT Found: ".mysql_error()); Code (markup):
Hi Raider. If you look at the image you will see what my code is doing now. I want example Vacant Land,Rentals and all the property related sub categories to be in the PROPERTY block and so on... My script works but it wrong for what I want to do