|
本帖最后由 spkinger 于 2013-5-22 18:13 编辑
生成的sql语句是
SELECT `chrdeal `.*, `o`.`price` AS or_price, `o`.`order` AS or_order, `o`.`create` AS or_create FROM (`tb_spk_chrdeal`) INNER JOIN `tb_spk_chrtmporder` o ON `o`.`sid` = `tb_spk_chrdeal`.`id` WHERE `tb_spk_o`.`buyer` = '29912' ;
我的代码是
$this->chrdb->select('chrdeal.*, o.price AS or_price, o.order AS or_order, o.create AS or_create');
$this->chrdb->where('o.buyer',$uid);
$this->chrdb->join('chrtmporder o','o.sid = chrdeal.id','inner');
return $this->chrdb->get('chrdeal')->row_array();
如题,在我设置了表前缀后,用别名的时候也被自动添加了前缀。。。
我现在只能全部换成表名了。
大家有没有好的解决办法 |
|