Welcome Guest, Not a member yet? Register   Sign In
Put Transactions in the Controller or Model
#1

[eluser]asciiCode[/eluser]
I have been reviewing my code and noticed that I am placing a lot of business logic in the model.

The reason for this is because I believe the database transactions have to be called in the model? Is this true or can I start a database transaction in the controller so it looks something like this in the controller

$this->db->trans_start();
$this->my_model->InsertSomeInfo();
$this->my_model->DeleteSomeInfo();
$this->db->trans_complete();

Thanks!


Messages In This Thread
Put Transactions in the Controller or Model - by El Forum - 09-23-2010, 02:58 PM
Put Transactions in the Controller or Model - by El Forum - 09-23-2010, 03:19 PM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 08:42 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 09:25 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 09:55 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 10:20 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 10:36 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 10:43 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 11:07 AM
Put Transactions in the Controller or Model - by El Forum - 09-24-2010, 12:31 PM
Put Transactions in the Controller or Model - by El Forum - 05-05-2011, 08:28 AM
Put Transactions in the Controller or Model - by El Forum - 06-09-2011, 04:44 AM
Put Transactions in the Controller or Model - by El Forum - 01-29-2012, 02:59 AM
Put Transactions in the Controller or Model - by El Forum - 12-15-2013, 04:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB