TP5.1 遇见问题整理
作者:互联网
1. 获取当前执行sql
fetchSql(true)
self::table('ecm_draw_address')->field('id')->where(array('store_id'=>$data['store_id']))->fetchSql(true)->find();
2. 多where条件
where("字段名","表达式",“查询条件”)
$where = [ ['activity_id', 'eq', $this->data['activity_id']], ['phone', 'neq', ""], ]; $award_info = DrawAwardModel::getList($where,'id','100','0','award_level asc');
标签:TP5.1,where,award,data,遇见,整理,true,id,store 来源: https://www.cnblogs.com/starfish29/p/11000179.html