我有一個要求,我需要將數據插入到不同的數據庫中的兩個表..如何將數據插入到其它數據庫中笨
$insert_query = 'INSERT INTO table1 (col1, col2) values(1, 2)';
$insert_otherdb_query= 'INSERT INTO otherdb.table1 (col1, col2) values(1, 2)';
$this->db->query($insert_query); //works fine
$this->db->query($insert_otherdb_query); //doesn't work
錯誤
Table 'mydb.otherdb.table1' doesn't exist
它不會忽略mydb這是我的默認數據庫...
任何suggesstions?
致命錯誤:調用一個成員功能數據庫()在C語言的非對象:\ XAMPP \ htdocs中\ mysite的\應用\控制器\在線路34上site.php – Rayiez
工程Gr8。謝謝! – Rayiez