Welcome Guest, Not a member yet? Register   Sign In
How should I use DB Transactions
#2

PHP Code:
$this->db->trans_begin();

$this->db->query('AN SQL QUERY...');
$this->db->query('ANOTHER QUERY...');
$this->db->query('AND YET ANOTHER QUERY...');

if (
$this->db->trans_status() === FALSE)
{
 
       $this->db->trans_rollback();
}
else
{
 
       $this->db->trans_commit();

What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How should I use DB Transactions - by InsiteFX - 09-01-2016, 04:07 AM
RE: How should I use DB Transactions - by Shawn - 09-02-2016, 05:52 PM
RE: How should I use DB Transactions - by Shawn - 09-01-2016, 09:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB