RE: [PHP-DB] mysql rereading result set (fetch_assoc)
| From: | christine | Date: | Wed, 10 Jan 2007 01:15:04 +0000 |
| Subject: | RE: [PHP-DB] mysql rereading result set (fetch_assoc) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42919@lists.php.net to get a copy of this message | ||
Hi, I would ask which way is more efficient and save time? Save each row to
array or mysql_data_seek(0) ?
Regards & Thanks,
Christine
-----Original Message-----
From: niel@catweasel.org [mailto:niel@catweasel.org]
Sent: Tuesday, January 09, 2007 18:23
To: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql rereading result set (fetch_assoc)
Hi
> I'm running thru a result set using fetch_assoc. Now I want to run
through
> it again.
>
> How?
Save each row into an array first time around, then reset the array
pointer to the beginning, would be one way.
Or assuming you're using the original MySQL functions, use
mysql_data_seek(0) to reset the internal result pointer, as one minute
scanning the function list in the documentation would tell you
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php