Received: from fwint-bci.bci.it (eufrate.bci.it [151.99.223.33]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA82758 for ; Thu, 24 Feb 2000 06:30:07 -0500 (EST) (envelope-from sbrozzi@bci.it) Received: from core-sile.bci.it (core-sile.bci.it [192.168.252.46]) by fwint-bci.bci.it (8.9.1a/8.9.1) with ESMTP id MAA347982; Thu, 24 Feb 2000 12:28:32 +0100 Received: from bci.it (xanadu.bci.it [91.1.12.33]) by core-sile.bci.it (8.9.1a/8.9.1) with ESMTP id MAA16574; Thu, 24 Feb 2000 12:29:25 +0100 Sender: root@core-sile.bci.it Message-ID: <38B517EF.B4090EA0@bci.it> Date: Thu, 24 Feb 2000 12:37:19 +0100 From: Stefano Brozzi Organization: Banca Commerciale Italiana X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: James Macken CC: pgsql-sql@hub.org Subject: Re: [SQL] PostgreSQL and PHP References: <001701bf7eb7$23a82400$ac7d2bcb@jay> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit James Macken wrote: > > To those of you who use PHP with PostgreSQL, > > I'm trying to do a simple select inside a ".php3" script. The php3 script > simply says something like (the linux machine is not turned on so I can't > grab it exactly): > > $database = pg_connect("","","","mydb"); > pg_exec($database, "select * from mytable"); > echo "whatever" > ?> > > and all I get is (in the resulting web page): > > whatever > I guess you have more lines in your php script, have you lines like these: $result = pg_Exec ($database, $sqlStr); if (!$result) { echo "An error occured.\n"; exit; } for($i=0; $i