implementing transactions in php for BerkeleyDB
578580May 20 2007 — edited May 27 2007Hi All,
i am inserting some data from one (mysql db) into other(berkeleyDB)
the data that i am inserting comes from 4 categories and i need to write it in 4 different files in BerkelyDB.
I want to implement transaction for this case.i.e if the operation fails in between, the BerkeleyDB files should not be written.(existing files should be continued to exist in the DB location.)
is there a way to implement transactions in BerkeleyDB?
i am a new bee to BerkeleyDB.also i googled somewhat but it didn't work for me :(
there is one option of setting DB_INIT_TXN flag in DB_ENV->open() but i could not find any support for such function in php.
If anybody could tell how to implement the above thing or any other way to implement transactions in BerkeleyDb I will be more than happy.If a working example could be told,that would be better for undestanding the things as i am a new bee to BerkeleyDB.
Thanks in advance,
-Rohant