Hi, thanks for you answer. So I couldn't use this query to get the category incl. sub-categories and add some sort of subquery or join to receive all the items from the category:
SELECT node.name
FROM nested_category AS node,
nested_category AS parent
WHERE node.lft BETWEEN parent.lft AND parent.rgt
AND parent.name = 'Category_Name'
ORDER BY node.lft;
Main Topics
Browse All Topics





by: Raynard7Posted on 2007-08-02 at 17:25:13ID: 19621882
Hi,
to navigate through hierarchial data tables in mysql there is no syntax to allow you to do so through joins, so you would either have to hard code how many levels you wish to search through, or alternatively build a stored procedure to do it for you.