Received: from trantor.eads-dsn.com (trantor.eads-dsn.com [194.117.220.38]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3I9Xcu00805 for ; Wed, 18 Apr 2001 05:33:40 -0400 (EDT) (envelope-from cyril.picard@eads-dsn.com) Received: by trantor.eads-dsn.com; id LAA22700; Wed, 18 Apr 2001 11:33:26 +0200 (MET DST) Received: from unknown(172.29.64.4) by trantor.eads-dsn.com via smap (4.5) id xma022697; Wed, 18 Apr 2001 11:33:09 +0200 Received: from edsnsrvbda01.edsn.com (edsnsrvbda01 [172.29.64.12]) by hermes.eads-dsn.com (8.11.0/8.11.0) with ESMTP id f3I9JqG03370 for ; Wed, 18 Apr 2001 11:19:52 +0200 Received: from pmrmnc.edsn.com ([131.129.4.201]) by edsnsrvbda01.edsn.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 2S6RQPAH; Wed, 18 Apr 2001 11:35:47 +0200 Received: from pmrpass.edsn.com (PMRPASS [192.168.4.3]) by pmrmnc.edsn.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 2HKJ3K51; Wed, 18 Apr 2001 11:35:18 +0200 Received: from pmrmsg.edsn.com ([130.10.50.9]) by pmrpass.edsn.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id G30JAT9R; Wed, 18 Apr 2001 11:33:33 +0200 Received: by pmrmsg.edsn.com with Internet Mail Service (5.5.2650.21) id ; Wed, 18 Apr 2001 11:33:21 +0200 Message-ID: From: "Picard, Cyril" To: "'pgsql'" Subject: maybe Offtopic : PostgreSQL & PHP ? Date: Wed, 18 Apr 2001 11:33:20 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain X-Archive-Number: 200104/298 X-Sequence-Number: 2654 Hi all, sorry for the maybe offtopic questions, but I did not get any answer from the PHP ML. I would like to query a postgresql db with the php language. Today I wrote a script (connectandquery.php) performing the following : - connect to the DB : $conn = pg_Connect("dbname = foo"); - execute the query : $res = pg_Exec($conn,"SELECT * from BAR"); But I would like to write this in two scripts : - connect.php : $conn = pg_Connect("dbname = foo"); - query.php : $res = pg_Exec($conn,"SELECT * from BAR"); but I don't know how to get the $conn variable (defined in connect.php) in the script query.php. Any idea is welcome !