RE: [phplib] Database query From: Chris Johnson (chris <email protected>)
Date: 02/27/01

One always has to use next_record() at least once to get the first row.
That's how PHP's database interface is designed (and for that matter,
how most database APIs are designed -- MySQL is that way for sure).

Are you saying you have to call it twice to get the first row?

..chris

> -----Original Message-----
> From: Peter J. [mailto:pumpos <email protected>]
> Sent: Sunday, February 25, 2001 12:53 PM
> To: phplib <email protected>
> Subject: [phplib] Database query
>
>
> Hello !
>
> I have a problem with database query.
> if I do a simple query on my private database and use
> the default class DB_Example, I get this error. :
>
> I have to run the next_record() function at
> first otherwise my first row will be an empty row.
> It's strange because the num_rows() method
> shows the perfect size. (It doesn't contains
> this extra row.)
>
> If I select the first row (number 0) with
> seek() function , I get empty fields with
> f($field) and p($field) methods similarly.
>
> What's the solution of this problem?
>
> --- Peter ---
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>