$complexResults = $query->table('users')->select('id', 'name')
->where('status', 1)->orWhere('role', 'admin')->whereLike('name', 'john')
->orderBy('id', 'desc')->limit(10)
->get();
sql=select * from users where status = 1 or role = 'admin' and name like '%john%' order by id desc limit 10
1. 基础查询:
sql=select * from users order by id desc
id=5 name=John Doe role= email=john@example.com status=1 created_at=3000
id=4 name=John Doe role=viewer email=john@example.com status=1 created_at=3000
id=3 name=John Doe role=viewer email=john@example.com status=1 created_at=3000
id=2 name=liao role=viewer email=liao@126.com status=20 created_at=200
id=1 name=James John Doe role=admin email=nstar@qq.com status=22 created_at=1000
结束查询
O:13:"model\Student":2:{s:4:"name";s:13:"liaomengcheng";s:3:"age";i:28;} {"name":"liaomengcheng","age":28}
equal=1
deep equal=
=============Redis Test=============
name=http:://study.nsstar.cn
array(2) { ["name"]=> string(5) "nstar" ["age"]=> int(26) }
card={"name":"nstar","age":26}
other name=other server val
Redis Test finished.