$join[]=array('tb_b a','t.id=a.id','left');
$where['t.id']=array('eq','1');
$res = Db::table('tb_a t')->field('t.id,a.id')->join($join)->where($where)->select();[code][/code]正常运行,可以查询到数据,left join也正常。但是,当$where['a.id']=array('eq','1')时,
报错:Column not found: 1054 Unknown column 'a.id' in 'where clause'。
我在tp5之前的版本里,是都可以正常运行的。
求解
最佳答案