数据库高级查询
1. where条件
$set = Db::table('mhh_user')->where('uid','>=',2)->select();
print_r($set);
2. 模糊查询 LIKE
$set = Db::table('mhh_user')->where('nickname','like','%编%')->select();
print_r($set);
3. 模糊查询,取反 NOTLIKE
$set = Db::table('mhh_user')->where('nickname','notlike','%编%')->select();
print_r($set);
4.1 查询区间 BETWEEN
$set = Db::table('mhh_user')->where('uid','between','5,10')->select();
print_r($set);
4.2 查询区间 NOTBETWEEN
$set = Db::table('mhh_user')->where('uid','NOTbetween','5,10')->select();
print_r($set);
5 指定查询 IN
$set = Db::table('mhh_user')->where('uid','in','5,7,10')->select();
print_r($set);
6 不等于 <>
$set = Db::table('mhh_user')->where('uid','<>','2')->select();
print_r($set);
数据请求
GET和POST(把请求做了一个类 Request)
print_r(Request::get());
print_r(Request::post());