Kanundra Posted February 25, 2011 Share Posted February 25, 2011 I have two tables, one called Categories and one called SubCategories. Each subcategory needs to be displayed under its parent category in a HTML table. So I have this code, but I don't know how to list each Sub-Category under each Category in a HTML table. <?php require ('includes/initialize.php'); require 'classes/database.class.php'; $sql = "SELECT * FROM Categories, SubCategories WHERE Categories.ID = SubCategories.CatID"; $Result = $database->Query($sql); $Data = $database->Fetch($Result); ?> Link to comment https://forums.phpfreaks.com/topic/228858-categories-sub-categories/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.