二デシベルのために、その後
$otherdb = $this->load->database('otherdb', TRUE);
$test= $otherdb->get('test');
はそれが動作を期待セカンダリデータベースへの接続コード
$db['otherdb']['hostname'] = "localhost";
$db['otherdb']['username'] = "root";
$db['otherdb']['password'] = "";
$db['otherdb']['database'] = "other_database_name";
$db['otherdb']['dbdriver'] = "mysql";
$db['otherdb']['dbprefix'] = "";
$db['otherdb']['pconnect'] = FALSE;
$db['otherdb']['db_debug'] = FALSE;
$db['otherdb']['cache_on'] = FALSE;
$db['otherdb']['cachedir'] = "";
$db['otherdb']['char_set'] = "utf8";
$db['otherdb']['dbcollat'] = "utf8_general_ci";
$db['otherdb']['swap_pre'] = "";
$db['otherdb']['autoinit'] = TRUE;
$db['otherdb']['stricton'] = FALSE;
の下に追加します。
すべてのデータベースはmysqlですか? – kodmanyagha
はい、すべてのクエリエラーですが、もう一度正常になりましたが、再度エラーが発生しました –
偽の永続接続を設定し、mysqlの最大接続数を増やします – kodmanyagha