forumcats: id, name
forums: id, name, cat_id
How can i join these together and print the forums assigned to the categories under them
Would really appriciate if someone could give me a hand
This is what i mean:
A category
A forum
<
A forum
A 2nd category
Another forum
Another forum
Another forum
A 3rd catagory
Another forum
Another forum
Another forum
$reslt = mysql_query("select id, name, cat_id from forums");
while ($row=mysql_fetch_assoc($reslt)) {
echo "<h1>Category here</h1<";
echo "<h3>$row[name]</h3>";
}
You want this query:
Then when you loop through the results, you want to identify when you’ve moved on to a new category. For example: