maybe Offtopic : PostgreSQL & PHP ?

Поиск
Список
Период
Сортировка
От Picard, Cyril
Тема maybe Offtopic : PostgreSQL & PHP ?
Дата
Msg-id B5CDCF382265D311BF33009027A8FE9401E6F3BC@pmrmsg.edsn.com
обсуждение исходный текст
Ответы Re: maybe Offtopic : PostgreSQL & PHP ?  (Keith Wong <keith@e-magine.com.au>)
Список 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 !


В списке pgsql-sql по дате отправления:

Предыдущее
От: Amanda Riera
Дата:
Сообщение: Re: Concatenate fields
Следующее
От: Sara Cohen
Дата:
Сообщение: Subqueries in select clause