RE: [PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
> 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/R

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Richard Quadling
On 28 July 2011 12:30, Arno Kuhl wrote: > On 28 July 2011 10:39, Arno Kuhl wrote: >> Arno Kuhl wrote: >>> 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 rec

RE: [PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
On 28 July 2011 10:39, Arno Kuhl wrote: > Arno Kuhl wrote: >> 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 >

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Lester Caine
Arno Kuhl wrote: 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.c

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Richard Quadling
And http://www.amazon.co.uk/exec/obidos/ASIN/1558609202/onlinepricecouk -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Richard Quadling
On 28 July 2011 10:39, Arno Kuhl wrote: > Arno Kuhl wrote: >> 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 >>

RE: [PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
Arno Kuhl wrote: > 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-

[PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
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 po