1.where方法进行AND条件查询

Db::table('think_user')->where('name','like','%thinkphp')->where('status',1)->find();

2.where方法多字段相同条件的AND查询

Db::table('think_user')->where('name&title','like','%thinkphp')->find();

3.whereOr方法进行OR查询

Db::table('think_user')->where('name','like','%thinkphp')->whereOr('title','like','%thinkphp')->find();

4.whereOr方法多字段相同条件的OR查询

Db::table('think_user')->where('name|title','like','%thinkphp')->find();

5.where方法和whereOr方法在复杂的查询条件中配合使用

$result=Db::table('think_user')->where(function($query){$query->where('id',1)->whereor('id',2);})->whereOr(function($query){$query->where('name','like','think')->whereOr('name','like','thinkphp');})->select();