Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A35DF47655E for ; Mon, 18 Nov 2002 12:13:48 -0500 (EST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by postgresql.org (Postfix) with ESMTP id C39A447655C for ; Mon, 18 Nov 2002 12:13:47 -0500 (EST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id gAIHBeXT024748; Mon, 18 Nov 2002 10:11:40 -0700 (MST) Date: Mon, 18 Nov 2002 10:12:40 -0700 (MST) From: "scott.marlowe" To: Cc: Subject: Re: Inquiry From Form [pgsql] In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailBodyFilter: Message body has not been filtered X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/77 X-Sequence-Number: 1659 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.