Re: transactions from PHP - double COMMIT required?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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/>



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux