2 distinct connections

Поиск
Список
Период
Сортировка
От Martin Marques
Тема 2 distinct connections
Дата
Msg-id Pine.LNX.4.61.0605270916100.21989@bugs.unl.edu.ar
обсуждение исходный текст
Ответы Re: 2 distinct connections  (Cornelia Boenigk <poppcorn@cornelia-boenigk.de>)
Re: 2 distinct connections  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
Список pgsql-php
We're working on a project using PHP and PostgreSQL, mainly trying to work
in an OOP fashion. The project has quite a good amount of code, and a DB
Object called DB_Bib that has all the query methods. I also have a generic
DB object (DB_Main) which has code to establesh the connection, and from
which my DB_bib Inerits the DB connection.

The thing is that I made a new class called DB_Debug which also inherits
from DB_Main, and is there to have debugging data inserted into a table in
the database.

I noticed that when the two objects are started (they both call the
connection method using the same connection string) php doesn't
initiate to distinct connections, but 1 connection within commands from
both objects get passed to the DB server.

The problem is that query commands from the DB_Debug object and from the
DB_Bib object get mixed up in the same connection, making it deficult to
know when to make a commit.

Is there a way to fix this without having to change the connection string?

--
  21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
---------------------------------------------------------
Lic. Martín Marqués         |   SELECT 'mmarques' ||
Centro de Telemática        |       '@' || 'unl.edu.ar';
Universidad Nacional        |   DBA, Programador,
     del Litoral             |   Administrador
---------------------------------------------------------

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

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: libpq.so.4 won't load for postgres 8.1.3, php 5.0.4-5
Следующее
От: Cornelia Boenigk
Дата:
Сообщение: Re: 2 distinct connections