[eluser]kamikaz[/eluser]
Hi,
I'm facing an issue : is it possible to call a model function in an other model (yes we can but is it a good way ?) but within the same transaction ?
I explain myself:
Code:
<?php
class Model1 extends CI_Model
{
//some code
function function1()
{
$this->load->model('model2');
$this->db->trans_start();
$this->get_db_info(); //happens in transaction
$this->model2->get_db_info(); //doesn't happen in transaction
$this->db->trans_complete();
}
}
Do you have an idea how to deal with this ?
Thank you