标签:count stat tab 字符串 nta operator code between 范围
where(‘id&age‘,‘>‘,0);
where(‘id|age‘,‘>‘,0);
$result = Db::name(‘data‘)
->select(function($query){$query->where(‘name‘,‘like‘,‘%think%‘)
->where(‘id‘,‘in‘,‘1,2,3‘)->limit(10);
});
$result = Db::name(‘data‘)
->select(function($query){$query->where(‘name‘,‘like‘,‘%think%‘)
->where(‘id‘,‘ between‘,[1,3])->limit(10);
});
$list = Db::name(‘data‘)
->where(‘status‘,1)
->column(‘name‘,‘id‘);
Db::name(‘data‘)
->where(‘id‘,‘>‘,1)
->count();
Db::name(‘data‘)
->where(‘id‘,‘>‘,1)
->max(‘age‘);
$result = Db::table(‘user‘)
->where(‘id>:id and name is not null‘,[‘id‘=>10])
->select();
$result = Db::table(‘user‘)
->whereTime(‘create_time‘,‘>‘,‘2017-01-01‘)
->select();
$result = Db::table(‘user‘)
->whereTime(‘create_time‘,‘week‘)
->select();
$result = Db::table(‘user‘)
->whereTime(‘create_time‘,‘-2 days‘)
->select();
$result = Db::table(‘user‘)
->whereTime(‘create_time‘,‘between‘,[‘2017-1-1‘,‘2017-1-10‘])
->select();
$result = Db::table(‘user‘)
->whereTime(‘create_time‘,‘last week‘)
->select();
标签:count stat tab 字符串 nta operator code between 范围
原文地址:https://www.cnblogs.com/nnhgd/p/9778251.html