Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: transactions from PHP - double COMMIT required?



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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group