Is there transaction support in the new SQLite3 PHP Class?
Question
I found that there is a new SQLite3 class (as of PHP 5.3.3) and started using it in my latest project.
http://www.php.net/manual/en/book.sqlite3.php
All was well till I needed transactions. Have I overlooked something in the documentation? How could I achieve transactions using this class.
Solution
Since SQLite3 itself supports transactions, it would seem that all you need to do is initialise transactions with a query: BEGIN TRANSACTION (much as you would in other systems) and COMMIT TRANSACTION to finalise the queryset.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow