Re: pg_fetch_array problem

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: pg_fetch_array problem
Дата
Msg-id Pine.LNX.4.33.0208081103500.24001-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: pg_fetch_array problem  ("David C. Brown" <dbrown@centennialwines.com>)
Список pgsql-php
On Thu, 8 Aug 2002, David C. Brown wrote:

> hmm.. you could try..
>
> for(var i=0; $dados = pg_fetch_array($limite, $i); i++) {
>      $nome = $dados["nome"];
>       echo "Name: $nome<BR>";
> }
>
> I believe your error is your not passing pg_fetch_array() the row you
> wish to return.  It *may* or may not work that way.  But leaving it open
> like that is sure to cause an error sooner or later.

Actually, no.  In the latest and greatest version of PHP, pg_fetch_array
returns false when it runs out of rows, so you can just use:

while ($row = pg_fetch_array){
    dosomething here...
}


В списке pgsql-php по дате отправления:

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: pg_fetch_array problem
Следующее
От: angelo.rigo@globo.com
Дата:
Сообщение: off topic rollback