i have a table
------------------------
id name parentid
------------------------
1 col1 NULL
2 col2 1
3 col3 1
4 col4 2
5 col5 2
6 col6 3
7 col7 4
what would be the easiest way to get a list of all child ids for an id.
for eg. for id = 1, i would need the the child ids as 2,3,4,5
and the levels deep can be dynamic.
Thanks