• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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);




Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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