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

2002-08-29 Thread Petre Agenbag
Hi Justin OK, a quick feedback on your previous suggestion: I tried to unset the $myrow_it, but it still didn't produce any output. The only way I could get it to work was with the same method you suggested in this e-mail. I had to create 2 new vars ( which basically boils down to 2 more SQL's).

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

2002-08-29 Thread Jason Wong
On Thursday 29 August 2002 14:16, Petre Agenbag wrote: Hi Justin OK, a quick feedback on your previous suggestion: I tried to unset the $myrow_it, but it still didn't produce any output. The only way I could get it to work was with the same method you suggested in this e-mail. I had to

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

2002-08-29 Thread Justin French
1. did my code work? 2. It appears that you have to reset the mysql_fetch_*(), not reset the $myrow. Try calling: mysql_data_seek($result_it, 0) before while ($myrow = mysql_fetch_assoc($result)) It would appear that it resets the $result_it for a call to mysql_fetch_row(). I

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

2002-08-29 Thread Petre Agenbag
Jason Sorry, I completely forgot to comment on your suggestion: I did try mysql_data_seek(), but it didn't work for me ( guess I don't know how exactly it works), BUT, it did look like it was meant for stepping through a one dimensional array, and $result is not a one dimensional array, right?

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

2002-08-29 Thread Petre Agenbag
Jason Thanks the mysql_data_seek() works. With Justin's help, I used the mysql_data_seek() to reset the $result matrix to 0, and re-issued the same while statement. It now produces the desired output. Thanks. On Thu, 2002-08-29 at 08:46, Jason Wong wrote: On Thursday 29 August 2002 14:16, Petre

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

2002-08-29 Thread Justin French
on 29/08/02 5:06 PM, Petre Agenbag ([EMAIL PROTECTED]) wrote: Jason Thanks the mysql_data_seek() works. With Justin's help, I used the mysql_data_seek() to reset the $result matrix to 0, and re-issued the same while statement. It now produces the desired output. Thanks. Of course I only