I have a simple catalogue running. Products are inside basic high level categories.. I select items from this based on this ID.
For example: SELECT * FROM products WHERE cateogryId = ?
However, I’ve now been asked to add sub categories.
So, if I had Cars before, I now have Cars > Toyota > 4WD
Toyota: 34 (Parent 2)
4WD: 23 (Parent 34)
Now when I select ID 2, I want to also select those within 34 & 23..
How can I do this?
Help @kiwis spread the word by sharing this article on Twitter...Tweet This