Re: persistent db connections in PHP

Поиск
Список
Период
Сортировка
От lawpoop@gmail.com
Тема Re: persistent db connections in PHP
Дата
Msg-id 1182092118.214922.4660@w5g2000hsg.googlegroups.com
обсуждение исходный текст
Ответ на Re: persistent db connections in PHP  ("Martin Gainty" <mgainty@hotmail.com>)
Ответы Re: persistent db connections in PHP  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
This seems to be a problem with PHP, or at least my set up.

I'm writing pages in basically the same way. Each page has an include
at the top that gets you a database session. The function, either
pg_connect() or mysql_connect(), is supposed to either create a new
connection, or return your existing one.

So after I have a connection, I can navigate to other pages, reload or
post to the current one, trigger the x_connect(), and get the session
I created earlier.

In my Mysql site, if I create temporary tables, I still have access to
them after I have traversed a mysql_connect. So it looks like PHP is
giving me the connection I had when I created the temp tables.

However, with this new Postgres site, I don't have access to my temp
tables after I've traversed another pg_connect. So PHP is either
creating a new connection, or giving me another session, not the one
which I created my tables in.

Steve


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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: how to speed up query
Следующее
От: Tom Lanyon
Дата:
Сообщение: fsync error when restoring from archived xlogs