Re: Porting Code to Postgresql

From: Richard Welty <rwelty(at)averillpark(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Porting Code to Postgresql
Date: 2003-10-15 17:33:11
Message-ID: Mahogany-0.66.0-1542-20031015-133311.00@averillpark.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 15 Oct 2003 08:43:07 -0700 Dennis Gearon <gearond(at)fireserve(dot)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(at)averillpark(dot)net
Averill Park Networking 518-573-7592
Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen 2003-10-15 17:36:15 Re: VACUUM degrades performance significantly. Database becomes unusable!
Previous Message Tom Lane 2003-10-15 16:57:19 Re: VACUUM degrades performance significantly. Database becomes unusable!