Reputation: 881
Is $this->db->trans_start();
is only applicable for $this->db->query();
?
I just want to know since all CI examples in the user guide uses $this->db->query();
does it applicable for this one? Example:
$this->db->select('an_baby.parent_number');
$this->db->from('an_parent');
$this->db->join('an_baby', 'an_baby.parent_number = an_parent.id', 'inner');
$this->db->where('date_born <=', date('Y-m-d'));
$this->db->where('type', 'NewBorn');
Any response is much appreciated. Thanks!
Upvotes: 1
Views: 786
Reputation: 1503
Every CI database function between $this->db->trans_start() and $this->db->trans_complete() is good.
Upvotes: 2
Reputation: 2378
Yes transactions will work fine with the active record style methods.
Upvotes: 2