overDeveloper
Programmer
I need a query to produce a tree node - something like:
parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
--- child/parent 2b
--- child 2b1
--- child 2b2
all of these are in the same table that looks something like:
id parentID hasChild name
I can change the fields if need be, but does anyone know how I can create a query that I would simply loop through to reproduce this?
parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
--- child/parent 2b
--- child 2b1
--- child 2b2
all of these are in the same table that looks something like:
id parentID hasChild name
I can change the fields if need be, but does anyone know how I can create a query that I would simply loop through to reproduce this?