samedi 18 avril 2015

performing a unique transaction in sqlite3 php

i have an sqlite3 database accessed using php,to which users insert and update rows simultaneously(multi-threaded). In order to avoid data corruption(and inaccurate results resulted from multiple connections and changes to the same row at the same time),i read about sqlite's unique transaction( however,i am not sure if i implimented it properly.i am using phppdo.

//..a few insert and update queries


as i understand it,a transaction is in the DEFFERED state by default. My question is - does the code i enclosed actually convert/create an exclusive transaction, and in case it does not - how do i accomplish that?


Aucun commentaire:

Enregistrer un commentaire