RE: mysql rereading result set (fetch_assoc)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx [mailto:niel@xxxxxxxxxxxxx] 
Sent: Tuesday, January 09, 2007 18:23
To: php-db@xxxxxxxxxxxxx
Subject: Re:  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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux