Re: [PHP] Stepping through an array more than once

2002-08-28 Thread Jason Wong
On Wednesday 28 August 2002 20:16, Petre Agenbag wrote: > Actually, it's not accurate for me to say "stepping through an array > more than once", as I want to step through the database ( $result) more > than once, without having to make connections to the db again. > Can this be done? mysql_data_

Re: [PHP] Stepping through an array more than once

2002-08-28 Thread Justin French
Try unset($myrow_it). You don't want to reset the array, you want to clear it, then use a new array (with the same name, and the same $result) for another while loop. FWIW, I'm pretty sure I'd just use three distinct queries. Infact, it'd be worth you timing your scripts with both these version

RE: [PHP] Stepping through an array more than once

2002-08-28 Thread Matt Schroebel
> From: Petre Agenbag [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 28, 2002 8:17 AM > To: Petre Agenbag > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Stepping through an array more than once > > > Actually, it's not accurate for me to say "stepping thro

Re: [PHP] Stepping through an array more than once

2002-08-28 Thread Petre Agenbag
Actually, it's not accurate for me to say "stepping through an array more than once", as I want to step through the database ( $result) more than once, without having to make connections to the db again. Can this be done? On Wed, 2002-08-28 at 13:58, Petre Agenbag wrote: > Hi > I would like to do

[PHP] Stepping through an array more than once

2002-08-28 Thread Petre Agenbag
Hi I would like to do something like the following: I have a table that contains a bunch of info at various "stages". To optimize the load on the db, I was thinking it would be better to do a "select * from table" , and then use PHP to sort through the results, rather than have 3 SQL's with "wher