Re: mysql_fetch_array missing first record

From: Date: Tue, 07 Aug 2001 20:48:33 +0000
Subject: Re: mysql_fetch_array missing first record
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-11117@lists.php.net to get a copy of this message
This was indeed the problem, I was calling the mysql_fetch_array earlier in the code. Once removed it worked fine. Thanks. Jamie "Paul Burney" <burney@gseis.ucla.edu> wrote in message news:B795A143.3897%burney@gseis.ucla.edu... > on 8/7/01 1:41 PM, Jamie (othermail@jamie-s.co.ukREMOVETOEMAIL) wrote: > > > while ($previews = mysql_fetch_array($result) { > > code to display record here... > > } > > > > For some reason it refuses to display the very first record in the table. > > Why is this and how can I get round it? > > Are you calling mysql_fetch_array before this in your code, perhaps to see > if there is a result? If so, that's the problem. Each call to > mysql_fetch_array (mysql_fetch_row) increments the array pointer. > > If that isn't your problem, please post more of the code so that we can make > a better diagnosis. > > Sincerely, > > Paul Burney > > +-------------------------+---------------------------------+ > | Paul Burney | P: 310.825.8365 | > | Webmaster && Programmer | E: <webmaster@gseis.ucla.edu> | > | UCLA -> GSE&IS -> ETU | W: > <http://www.gseis.ucla.edu/> | > +-------------------------+---------------------------------+ >

« previous php.db (#11117) next »