Skip site navigation (1) Skip section navigation (2)

Re: Inquiry From Form [pgsql]

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: <brew(at)theMode(dot)com>
Cc: <pgsql-php(at)postgresql(dot)org>
Subject: Re: Inquiry From Form [pgsql]
Date: 2002-11-18 17:12:40
Message-ID: Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com (view raw or flat)
Thread:
Lists: pgsql-php
On Sun, 17 Nov 2002 brew(at)theMode(dot)com wrote:

> 
> On Fri, 15 Nov 2002, William wrote:
> 
> > I code with PHP and use it to communicate with MySQL, if I started using
> > PostgreSQL would I have to change my coding to communicate with the
> > database?
> 
> Probably, but only slightly.
> 
> I changed my DB from MySQL to PostgreSQL and had to change each SQL call
> slightly.  It seems to me the difference was PostgreSQL needs to know the
> number of rows gotten and then loop through them with a for loop, with
> MySQL I was able to use a while loop without checking the number of rows
> first.
> 
> It could have been my inexperience that caused me to miss the obvious,
> though.

The ability to use the 

while ($row = pg_fetch_array(res)){

}

construct wasn't included in PHP until somewhere around 4.1 or 4.2 I 
think.



In response to

pgsql-php by date

Next:From: Keary SuskaDate: 2002-11-18 17:19:34
Subject: Re: Nested select to same tsble
Previous:From: scott.marloweDate: 2002-11-18 17:07:26
Subject: Re: Inquiry From Form [pgsql]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group