如何在 Kohana 中连接不同数据库中的表?
$tb_new = 'db_zaboo_feed.feed_' . $feed;
$ids = DB::query(Database::SELECT,
"SELECT d.fuid_id, d.user_id FROM db_zaboo.displays d
LEFT JOIN $tb_new f ON(d.fuid_id = f.uid)
WHERE d.user_id = (SELECT user_id FROM $tb_new GROUP BY user_id) AND f.uid IS NULL")->execute();
错误:
Database_Exception [ 1146 ]: Table 'db_zaboo.displays' doesn't exist [ SELECT d.fuid_id, d.user_id FROM db_zaboo.displays d LEFT JOIN db_zaboo_feed.feed_3 f ON(d.fuid_id = f.uid) WHERE d.user_id = (SELECT user_id FROM db_zaboo_feed.feed_3 GROUP BY user_id) AND f.uid IS NULL ]