Re: Porting Code to Postgresql - Mailing list pgsql-general

From Richard Welty
Subject Re: Porting Code to Postgresql
Date
Msg-id Mahogany-0.66.0-1542-20031015-133311.00@averillpark.net
Whole thread Raw
In response to Re: Porting Code to Postgresql  (Dennis Gearon <gearond@fireserve.net>)
Responses Re: Porting Code to Postgresql  (Dennis Gearon <gearond@fireserve.net>)
List pgsql-general
On Wed, 15 Oct 2003 08:43:07 -0700 Dennis Gearon <gearond@fireserve.net> wrote:

> >$count = pg_numrows( $result);
> >for( $i = 0; $i < $count; $i++){
...
> in case of no rows, maybe do:
>
> $count = pg_numrows( $result);
> while ( 0 < $result ){
...

shouldn't make a difference; in php, the condition on a for() should be at
the top of the loop anyway.

richard
--
Richard Welty                                         rwelty@averillpark.net
Averill Park Networking                                         518-573-7592
    Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: VACUUM degrades performance significantly. Database becomes unusable!
Next
From: Holger Marzen
Date:
Subject: Re: orphaned psql's