Bogdan Stancescu wrote:
Hello list,

I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits the existing
transaction, and setting a savepoint silently fails outside
transactions. And I was unable to find any non-destructive way of
retrieving that information -- is there any?

I don't use MySQL, having been embeded with a 'real' database since before MySQL even thought about transactions ;) but your question does not make sense from a functional point of view.

The whole point of a transaction is to bundle together a packet of work. If any part of the packet fails, then it can be rolled back to a known place. If you are doing a package of work within your library, you would use your own transaction. If you are processing data for a higher level function, either that function would pass you the transaction handle, or IT would handle your return and roll back or carry on as required.

Or am I simply missing something because MySQL still does not ACTUALLY support real transactions? ( This discussion may be better on the PHPDatabase list )

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to