> I'm currently using MySQL but I'll switch databases if there's a > compelling reason and no drawbacks. > Thanks for the lead, I'm googling recursive queries. 'common table expression' is the thing to google for, but MSDN seem to have hijacked all the top spots. http://syntaxhelp.com/SQLServer/Recursive_CTE is a nice example of what you outlined ... -- Lester Caine - G8HFL ----------------------------- Thanks Lester. The data structure is a good example of what I outlined. I want to avoid the recursion, whether in php or sql, possibly by using the nested set model. Cheers Arno -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php