Created
May 30, 2011 14:50
-
-
Save aj-justo/999000 to your computer and use it in GitHub Desktop.
Zen Cart: Select all products in a main category AND its subcategories (with a level 2 nesting)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM products_to_categories | |
WHERE categories_id | |
IN ( | |
SELECT categories_id | |
FROM categories | |
WHERE parent_id | |
IN ( | |
SELECT categories_id | |
FROM categories | |
WHERE categories_id =100094 | |
OR parent_id =100094 | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment