X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 97E249FA490 for ; Sat, 27 May 2006 09:39:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 57061-05 for ; Sat, 27 May 2006 09:39:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (Postfix) with ESMTP id 2A2A89FA0EC for ; Sat, 27 May 2006 09:39:17 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id A76F213899 for ; Sat, 27 May 2006 09:37:07 -0300 (ART) Received: from bugs.unl.edu.ar ([127.0.0.1]) by localhost (bugs.unl.edu.ar [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SgZV3GeSXRQY for ; Sat, 27 May 2006 09:37:07 -0300 (ART) Received: by bugs.unl.edu.ar (Postfix, from userid 1000) id C391F138BE; Sat, 27 May 2006 09:37:06 -0300 (ART) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id 998C113899 for ; Sat, 27 May 2006 09:37:06 -0300 (ART) Date: Sat, 27 May 2006 09:37:06 -0300 (ART) From: Martin Marques To: pgsql-php@postgresql.org Subject: 2 distinct connections Message-ID: MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 200605/22 X-Sequence-Number: 3522 We're working on a project using PHP and PostgreSQL, mainly trying to work= =20 in an OOP fashion. The project has quite a good amount of code, and a DB=20 Object called DB_Bib that has all the query methods. I also have a generic= =20 DB object (DB_Main) which has code to establesh the connection, and from=20 which my DB_bib Inerits the DB connection. The thing is that I made a new class called DB_Debug which also inherits=20 from DB_Main, and is there to have debugging data inserted into a table in= =20 the database. I noticed that when the two objects are started (they both call the=20 connection method using the same connection string) php doesn't=20 initiate to distinct connections, but 1 connection within commands from=20 both objects get passed to the DB server. The problem is that query commands from the DB_Debug object and from the=20 DB_Bib object get mixed up in the same connection, making it deficult to=20 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=EDn Marqu=E9s | SELECT 'mmarques' ||=20 Centro de Telem=E1tica | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------=