having

having :having条件


  1. having('count(user_id)>10')
  2. $where =new Where();
  3. 相当于
  4. $where->where('count(user_id)','>',10);
  5. having($where);

实例:

  1. DB::select('user_event e')->having('count(user_id)>10')->group('begin_day')->findAll();
  2. 相当于sql
  3. select * from user_event e having count(user_id)>10 group by begin_day

上一篇:distinct   下一篇:group