Re: mysql_data_seek problem
| From: | Chris | Date: | Mon, 02 May 2005 00:18:09 +0000 |
| Subject: | Re: mysql_data_seek problem | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39329@lists.php.net to get a copy of this message | ||
Sorry, two typos, that should; have been:
if(mysql_num_rows($rResult) > 0)) mysql_data_seek($rResult,0);
Chris wrote:
Just add a check of the total returned rows, and seek to 0 only if there is 1 or more. if(mysql_num_rows($rResult) > 1) mysql_data_seek($rResult,0); Chris Alvaro Cobo wrote:Hi all: I am having problems with the function mysql_data_seek when it refers to an array with an empty recordset (for example when the query does not returns data), so I keep receiving the following message in the browser: Warning: mysql_data_seek(): Offset 0 is invalid for MySQL result index 9 (or the query data is unbuffered) in /var/www/intranet/inform/view.php on line 146 I need this function to reset an array to use the same query several times in the same page. Does anybody knows how to avoid this message to be printed? Thanks a lot. Alvaro