[PHP] Brainiacs please help! PostgreSQL and foreach() problem

2003-09-09 Thread Peter Sharpe
I have a database full of names. each name could be linked to any number of sub-names, each sub-name could be linked to any number of sub-sub-names, to infinity (unlikely but possible). I need to iterate through this nest of names starting with a main name; lets call the main name Peter. Peter

Re: [PHP] Brainiacs please help! PostgreSQL and foreach() problem

2003-09-09 Thread Raditha Dissanayake
Hi, It's not very clear what you are trying to do. From what i understand from your mail, i think a recursive call to select_names would be the ideal solution. In these scenario you call select_names() once and from within the function you call select_name() again for the each of the matches