I have this categories structure for category and parent:
| id | title | parent_id |
| 1 | cat1 | 0 |
| 2 | cat2 | 1 |
| 3 | cat3 | 2 |
| 4 | cat4 | 0 |
I need to show output using GROUP_CONCAT
and SEPERATOR ' >'
like this:
cat 1
cat 1 > cat 2
cat 1 > cat 2 > cat 3
cat 4
How do can i generate this? thanks for any help.