tp5.1左连接有问题

浏览:1786 发布日期:2018/09/06 分类:ThinkPHP5专区 关键字: bug
$coupon = Db::name('MemberCoupon')
->alias('mc.id,mc.')
->join(['dt_seller' => 's'],'mc.seller_id = s.id')
->join(['dt_seller_coupon' => 'sc'],'mc.coupon_id = sc.id')
->where(['mc.member_id'=>$this->memberId,'sc.is_deleted' => 0,'sc.status' => 0])
->whereBetweenTimeField('sc.start_time','sc.end_time')
->field('mc.id,mc.seller_id,mc.coupon_id')
->page($page)
->limit(5)
->select();


SQLSTATE[42S02]: base table or view not found: 1146 Table '微商盟.sc' doesn't exist
一直在报第二张表不存在 leftJoin也是同样的情况
最佳答案
评论( 相关
后面还有条评论,点击查看>>