CodeIgniter Check the connection to multi databases take long time
问题 I try to connect to multi MySQL database in CI if the connection to the first DB fails, I try to connect to the second, I use this code from CI forum: http://ellislab.com/forums/viewthread/224522/#1030449 $db_obj = $this->database->load('xxx',TRUE); $connected = $db_obj->initialize(); if (!$connected) { $db_obj = $this->database->load('yyy',TRUE); } it works fine on local host, it tries to connect to 1st DB and fails, then directly connect to the 2nd DB (without any long time -- transparency)