From: | "Picard, Cyril" <cyril(dot)picard(at)eads-dsn(dot)com> |
---|---|
To: | "'pgsql'" <pgsql-sql(at)postgresql(dot)org> |
Subject: | maybe Offtopic : PostgreSQL & PHP ? |
Date: | 2001-04-18 09:33:20 |
Message-ID: | B5CDCF382265D311BF33009027A8FE9401E6F3BC@pmrmsg.edsn.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php pgsql-sql |
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 !
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Wong | 2001-04-18 12:35:09 | Re: maybe Offtopic : PostgreSQL & PHP ? |
Previous Message | Sterin, Ilya | 2001-04-16 02:04:24 | RE: DBD and DBI::Pg |
From | Date | Subject | |
---|---|---|---|
Next Message | Sara Cohen | 2001-04-18 09:45:50 | Subqueries in select clause |
Previous Message | Amanda Riera | 2001-04-18 08:28:49 | Re: Concatenate fields |