Re: transactions from PHP - double COMMIT required? - Mailing list pgsql-php

From Jeff MacDonald
Subject Re: transactions from PHP - double COMMIT required?
Date
Msg-id 200703011158.39438.jam@zoidtechnologies.com
Whole thread Raw
In response to Re: transactions from PHP - double COMMIT required?  (mikie <mikie.pl@gmail.com>)
List 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/>


pgsql-php by date:

Previous
From: "Martin A. Marques"
Date:
Subject: Re: transactions from PHP - double COMMIT required?
Next
From: Robert Treat
Date:
Subject: Re: transactions from PHP - double COMMIT required?