Hi This might be a basic question but I'm not very good with MySql.
I have 3 tables
cat: The Main Category
scat: The Sub Category
product: The Product info, cat_ID and scat_ID
I need to output all product BY Main Category then sub category.
Right Now I get all the records for Main Category then
loop though and in the loop I get all Sub Categories Where cat_ID is the current Main Category.
Then I loop through again and get all product where the scat_ID id the current s_cat.
Then I loop through and output the product info.
Anyway the page load times are not great and I'm sure I am hitting the database way to much.
Thanks in advance,
D
I have 3 tables
cat: The Main Category
scat: The Sub Category
product: The Product info, cat_ID and scat_ID
I need to output all product BY Main Category then sub category.
Right Now I get all the records for Main Category then
loop though and in the loop I get all Sub Categories Where cat_ID is the current Main Category.
Then I loop through again and get all product where the scat_ID id the current s_cat.
Then I loop through and output the product info.
Anyway the page load times are not great and I'm sure I am hitting the database way to much.
Thanks in advance,
D