menu
Best Way To Use Transaction In Database Operation In CakePHP 2.X
Best Way To Use Transaction In Database Operation In CakePHP 2.X
To perform a transaction, a model’s table must be of a data source and type which supports transactions. At Andolasoft we are very much experienced in handling the transmission issues in database.

Best Way To Use Transaction In Database Operation In CakePHP 2.X

Sometimes we need to use the database transaction for saving the data in the tables for a complex application. Like booking online tickets for any show, movies, bus and planes.

In this case there will be some probability that the data will not be saved in the database due to a reason, like network failure, database inconsistency or table integrity etc.

There might be a case where data is saved partially in some tables and will create data inconsistency. The best example we can take here is ATM. i.e. you got a message that the amount has deducted from your account but you did not receive the money from the ATM.

To handle situations like this the CakePHP 2.x provides a feature transaction. Using transactions we cannot avoid the situation but can protect the harm it causes.

To perform a transaction, a model’s table must be of a data source and type which supports transactions.

 

Read More on Transaction In Database Operation In CakePHP