Re: transactions from PHP - double COMMIT required?

From: Jeff MacDonald <jam(at)zoidtechnologies(dot)com>
To: pgsql-php(at)postgresql(dot)org
Cc: mikie <mikie(dot)pl(at)gmail(dot)com>, Jeff MacDonald <jam(at)zoidtechnologies(dot)com>
Subject: Re: transactions from PHP - double COMMIT required?
Date: 2007-03-01 16:58:39
Message-ID: 200703011158.39438.jam@zoidtechnologies.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Thursday 01 March 2007 11:42 am, mikie wrote:
[..snipped..]
> Thats exactly what I was thinking, too. But PHP does things in some
> other way, I guess.
> I am sending an entire sql transaction block to the PHP pg_query
> command, so it starts with BEGIN and ends with COMMIT. Then I still
> have to execute another pg_query with "commit;" only - thats why I am
> asking here if maybe someone know what the problem is.
>

greetings,

I don't know if this will solve your problem or not, but on my
machines, "autoCommit" is set to "true" by default (using PEAR::DB).. so when
I want to do an operation that I expect to have to rollback, I turn *off*
autocommit, do my begin, run my queries, then a commit or rollback at the
end, followed by restoring autoCommit. it sounds to me like that is what is
happening.

regards,
--
Jeff MacDonald,
Zoid Technologies <http://zoidtechnologies.com/>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Martin A. Marques 2007-03-01 17:25:46 Re: transactions from PHP - double COMMIT required?
Previous Message Robert Treat 2007-03-01 16:51:09 New PHPUG starting in Columbia, MD