Re: Problem with pointer in result handle

From: Date: Tue, 18 Mar 2003 06:50:24 +0000
Subject: Re: Problem with pointer in result handle
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140075@lists.php.net to get a copy of this message
I've discovered that it is not the pointer in the array that I am having problems with but rather the pointer in the result handle. From what I gather, when a mysql_fetch function (mysql_fetch_row, mysql_fetch_assoc, mysql_fetch_array) retrieves a row from the result handle (In this case it is $rsCommunitiesServed), the result handle's internal pointer is advanced one position. The first mysql_fetch function (mysql_fetch_assoc) used in the recordset block causes the result handle's internal pointer to advance to the second record. So, when I later use mysql_fetch_array, the result handle's internal pointer is now on the second row of the results and so it gives me the second record. Actually, I use the mysql_fetch_array function in a while loop so what I get is all the records in the array which includes all records from the result set except for the first record. So, what I need to do is move the internal pointer of the result handle back to the first row of the result set. How can I do this? Thank you, Blaine

« previous php.general (#140075) next »