Re: [PHP-DB] mysql_data_seek problem

2005-05-01 Thread Chris
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

Re: [PHP-DB] mysql_data_seek problem

2005-05-01 Thread Chris
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

[PHP-DB] mysql_data_seek problem

2005-04-29 Thread Alvaro Cobo
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