I have the following three tables:
links (fields: linkid, linkdescr)
category (fields: catid, catedescr)
subcategory (fields: catid, subcatid, subcatdescr)
How can i get all the categories and three (or more) of each subcategory and a summary of all links for each category, with one query?
I want to display something like this:
Category 1 (20)
Subcat1-1, Subcat1-2, Subcat1-3
Category 2 (17)
Subcat2-1, Subcat2-2, Subcat2-3
Category 3 (12)
Subcat3-1, Subcat3-2, Subcat3-3
etc etc...
links (fields: linkid, linkdescr)
category (fields: catid, catedescr)
subcategory (fields: catid, subcatid, subcatdescr)
How can i get all the categories and three (or more) of each subcategory and a summary of all links for each category, with one query?
I want to display something like this:
Category 1 (20)
Subcat1-1, Subcat1-2, Subcat1-3
Category 2 (17)
Subcat2-1, Subcat2-2, Subcat2-3
Category 3 (12)
Subcat3-1, Subcat3-2, Subcat3-3
etc etc...