Actually I have categories (parent) and subchildrens(childrens) I want to display something like that :
-Parent 1
-- children 1
-- children 2
-Parent 2
-- children 1
-- children 2
So I thought of making a loop that displays all the parents, then inside a second loop that displays the child categories whose id corresponds to the parent id of the parent category
For the moment I can get all parents categories
And a children like this :
It is possible to get theses children with an SQL request like this or there are others best ways ? :
Select *
From sys_category c
INNER JOIN sys_category c1
ON c.parent = c1.uid