Hmm this is really hard to explain…Basically i have two tables, one is entitled catagory and the other one is entitled tutorials. In the catagory table it has 2 fields id and catagoryname, in tutorials it has 6 fields… but in this problem only 1 is needed, catagory. On a tutorials.php, it gets all the catagories from the table catagory and makes the catagories into a variable,$catagoryname. Then it gets everything from the tutorial table where catagory=$catagoryname, and then i want it to display the tutorial catagory name and how many tutorials came up… ex:
Tutorials:
Photoshop 7.0 (3)
[code] $q=mysql_query(‘SELECT * FROM catagory ORDER BY id DESC’); //Gets all the tutorials in the data base
while($l=mysql_fetch_array($q)){
$catagoryname=$l[“name”];
$q2=mysql_query('SELECT * FROM tutorials WHERE catagory=$catagoryname');
} [/code]
that is what i have so far… any help would be great!
Thanks,
Justin