I have a MySQL table with parent child relationship. I need to update one field of all child records when I give the parent id. Parent can have unlimited child levels in the table.
My table is like this
ID Name ParentID
1 a
2 b 1
3 c 2
4 d 1
How can I do this?
Thank you