pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott.marlowe <scott.marlowe@ihs.com>
To: brew@theMode.com
Cc: pgsql-php@postgresql.org
Subject: Re: Inquiry From Form [pgsql]
Date: Mon, 18 Nov 2002 10:12:40 -0700 (MST)
Message-ID: <Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com> (raw)
In-Reply-To: <Pine.BSF.4.44.0211170524530.37645-100000@themode.com>

On Sun, 17 Nov 2002 brew@theMode.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.





view thread (10+ messages)  latest in thread

Message-ID: <Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com>
Permalink:  ../Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: scott.marlowe@ihs.com, brew@theMode.com
  Subject: Re: Inquiry From Form [pgsql]
  In-Reply-To: <Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com>
  References: <Pine.BSF.4.44.0211170524530.37645-100000@themode.com> <Pine.LNX.4.33.0211181011340.17026-100000@css120.ihs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox