Here's the simplified schema:
Inventory
------------
productId
cat_id
name
...
Category
------------
cat_id
cat_father_id
cat_name
Cats_Idx <-- no idea what this means
-----------
id
cat_id
productId
Here's what I want to do:
Given a category number (cat_id), I want to select all products from all the child (and grandchild etc) categories of that cat_id.
I want this to be done in a single MySQL query.. but if it's not possible, then I'll take alternatives.
Caveat:
You cannot change the schema.. otherwise I would have to change a whole bunch of other stuff. If you really want to know, this is from CubeCart 3.0.14, in includes/content/content/viewCat.inc.php.
Edit:
Found out another way to do this within the application.
Thanks!
Inventory
------------
productId
cat_id
name
...
Category
------------
cat_id
cat_father_id
cat_name
Cats_Idx <-- no idea what this means
-----------
id
cat_id
productId
Here's what I want to do:
Given a category number (cat_id), I want to select all products from all the child (and grandchild etc) categories of that cat_id.
I want this to be done in a single MySQL query.. but if it's not possible, then I'll take alternatives.
Caveat:
You cannot change the schema.. otherwise I would have to change a whole bunch of other stuff. If you really want to know, this is from CubeCart 3.0.14, in includes/content/content/viewCat.inc.php.
Edit:
Found out another way to do this within the application.
Thanks!