RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread David Robley
On Thu, 25 Nov 2004 01:36, Mark Benson wrote: > > On Wednesday, November 24, 2004, at 02:40PM, Norland, Martin > <[EMAIL PROTECTED]> wrote: > >>The real problem you're having is the statement says "while there are >>results in this query, grab them" - once you reach the end of the first >>while

Re: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Jason Wong
On Wednesday 24 November 2004 23:02, Mark Benson wrote: > >You want people to focus on your real problem and not on > >the mistakes you made in transcribing your actual code into your post. > I actually write (rather badly it would seem!) theoretical examples Please don't construct theoretical e

RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Norland, Martin
-Original Message- From: Mark Benson [mailto:[EMAIL PROTECTED] >The real problem you're having is the statement says "while there are >results in this query, grab them" - once you reach the end of the first >while loop, there are no more results, so the second one is skipped >right ove

RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Mark Benson
On Wednesday, November 24, 2004, at 02:40PM, Norland, Martin <[EMAIL PROTECTED]> wrote: >The real problem you're having is the statement says "while there are >results in this query, grab them" - once you reach the end of the first >while loop, there are no more results, so the second one is sk

RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Mark Benson
On Wednesday 24 November 2004 20:31, Mark Benson wrote: >> From the above code, >Actually the above code would result in a parse error. There are no >where-loops in PHP but there are while-loops. This is not being pedantic. If >you're going to post code, make sure it's verbatim by using "copy

RE: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Norland, Martin
The real problem you're having is the statement says "while there are results in this query, grab them" - once you reach the end of the first while loop, there are no more results, so the second one is skipped right over - it's condition *never* evaluates true. If the query isn't changing, and the

Re: [PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Jason Wong
On Wednesday 24 November 2004 20:31, Mark Benson wrote: > From the above code, Actually the above code would result in a parse error. There are no where-loops in PHP but there are while-loops. This is not being pedantic. If you're going to post code, make sure it's verbatim by using "copy and p

[PHP-DB] Using a loop on a result destroys array??

2004-11-24 Thread Mark Benson
I have another issue. I have a fairly large script that requires data to be read for 2 separate purposes from the results of the same query. e.g.: = = >From the above code, loop 2 r