Re: [PHP-DB] mysql_fetch_array missing first record

2001-08-07 Thread Jamie Saunders

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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 8/7/01 1:41 PM, Jamie ([EMAIL PROTECTED]) 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: <[EMAIL PROTECTED]>   |
> | UCLA -> GSE&IS -> ETU   | W:  |
> +-+-+
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mysql_fetch_array missing first record

2001-08-07 Thread Paul DuBois

At 9:41 PM +0100 8/7/01, Jamie wrote:
>Hi,
>
>I have this code to display records from a table by reading them into an
>array:
>
>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.

The first record in the table, or the first record in the result set?


>Why is this and how can I get round it?

Hard to say without seeing the surrounding context.


>
>Thanks.
>
>Jamie Saunders


-- 
Paul DuBois, [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mysql_fetch_array missing first record

2001-08-07 Thread Paul Burney

on 8/7/01 1:41 PM, Jamie ([EMAIL PROTECTED]) 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: <[EMAIL PROTECTED]>   |
| UCLA -> GSE&IS -> ETU   | W:  |
+-+-+


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] mysql_fetch_array missing first record

2001-08-07 Thread Jamie

Hi,

I have this code to display records from a table by reading them into an
array:

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?

Thanks.

Jamie Saunders



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]