I have a table like
id | parent_id
-----------------
55
56 55
57 55
58 56
59 57
60 59
61 60
Now when i select 55 i need all of its children and sub children. How to get that.
Like,
55->56->58
->57->59->60->61
so i need 56,57,58,59,60,61
and when i select 60
60->61
i need only 61.
How to retrieve it ?? Please give me idea. Thanks in advance.