Welcome Guest, Not a member yet? Register   Sign In
2 databases, 1 transaction?

Hi all!

My question is simple may be- Can I do the following:

add(edit, delete) a record in database#1,
load database#2,
change $active_group,
add(edit, delete) a record in database#2,
close connection to #2,
change $active_group back,
and, at last, finish with $this->db->trans_complete()

Is the $this->db->trans_status() result reliable in this case or not?

Thank you

Found the answer myself: " Transactions are isolated within a single "database"" http://stackoverflow.com/questions/22398...ansactions

Bad news Sad

Is there a method to synchronize 2 databases on the fly?

You can do the below though:

$db1 = $this->load->database('db1', TRUE);
$db2 = $this->load->database('db2', TRUE);




Theme © iAndrew 2016 - Forum software by © MyBB