Not strictly a php issue but it's for a php app, hope that counts (plus I
haven't had much joy googling this)
 
I have a table with an id and a parentid. 
If it's a top-level record the parentid is 0, otherwise it points to another
record, and if that record isn't a top-level record its parentid points to
another record, etc (a linked list).
 
Is there a single select that will return the complete list of parentids?
Or do I have to iterate selecting each parent record while parentid > 0 and
build the list entry by entry?
 
TIA
Cheers, Arno


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to