• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How does $this->db->trans_status() work?

#1
[eluser]Syed Rakib Al Hasan[/eluser]
How exactly does `$this->db->trans_status()` understand that whether the queries in the transaction were successful or not?

Source: http://ellislab.com/codeigniter/user-gui...tions.html
Quote:
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();
}


Messages In This Thread
How does $this->db->trans_status() work? - by El Forum - 07-02-2012, 01:31 PM
How does $this->db->trans_status() work? - by El Forum - 07-02-2012, 01:41 PM
How does $this->db->trans_status() work? - by El Forum - 07-02-2012, 04:46 PM
How does $this->db->trans_status() work? - by El Forum - 07-02-2012, 11:49 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.