I'm a newbie so bear with me. I'm making a little forum for fun. Check it:
Categories:
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`position` int(11) NOT NULL,
PRIMARY KEY (`id`)
Forums:
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` text NOT NULL,
`position` int(11) NOT NULL,
`cat_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
I wonder how I should structure it so it loops out the categories and the assigned forums below it :/
Am I on the right path?
<?php
$query = mysql_query("SELECT * FROM forums JOIN...");
while ($row = mysql_fetch_array($query)) {..
?>
Maybe some sql guru can help me out.
Cheers!