Hi all, I need some help with recursion in mySql. I have the following table:
ID | Name | ParentID -------------------- 1 | Bob | 0 2 | John | 1 3 | Elm | 1 etc. For a given ID, I need to recurse up the tree and get all the parents. I've already read about Joe Celko's nested set approach, but it's not a good solution as apparently updates are a real pain and this table will be modified heavily. Does anyone have any good suggestions?? Maybe store procs (although, by all accounts store proc functionality doesn't come standard with mySql)?? Thanks --- Rob ************************** Rob Cherry mailto:[EMAIL PROTECTED] +27 21 447 7440 Jam Warehouse RSA Smart Business Innovation http://www.jamwarehouse.com ************************** --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php