时间查询的问题

浏览:947 发布日期:2019/02/25 分类:ThinkPHP5专区
查询条件带表别名:$where["sb.create_time"] = ['between time', [strtotime($params['start_date']), strtotime($params['end_date'])]];
Db::name('student_base sb')->where($where)->......

提示:SQLSTATE[42S02]: base table or view not found: 1146 Table 'zhuzhiguang.sb' doesn't exist

如果去掉sb.前缀,又提示:SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'create_time' in where clause is ambiguous

不知道是不是bug
最佳答案
评论( 相关
后面还有条评论,点击查看>>