From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | "David C(dot) Brown" <dbrown(at)centennialwines(dot)com> |
Cc: | <angelo(dot)rigo(at)globo(dot)com>, <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: pg_fetch_array problem |
Date: | 2002-08-08 17:04:55 |
Message-ID: | Pine.LNX.4.33.0208081103500.24001-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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...
}
From | Date | Subject | |
---|---|---|---|
Next Message | angelo.rigo | 2002-08-08 17:30:49 | off topic rollback |
Previous Message | scott.marlowe | 2002-08-08 17:03:38 | Re: pg_fetch_array problem |