thinkphp 3.2 join +where问题

浏览:12413 发布日期:2015/04/22 分类:求助交流 关键字: thnikphp join left join where
问题是使用了模型的join后,where条件里包含被join的表字段时就会报找不到列异常!请教这是什么问题!!!!!
$data =
$goods->field('th_goods.*,th__user.provinceId')->join('left join th_user on th_goods.userId = th_user.userId')->where($whereCondition)->select();
where条件里有user表的provinceId,问题是生成的sql在数据库测试是可以正常执行,但是thinkphp 异常是找不到provinceId列。请问这是什么问题?
最佳答案
评论( 相关
后面还有条评论,点击查看>>