Blogger Information
Blog 42
fans 0
comment 0
visits 15314
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0829数据库 查询练习
小言
Original
453 people have browsed it

1.数据库查询

1.1where 查询

  1. 可以使用 符号 = > < <=
  2. $ret = Db::table('oyk_user')->where('uid','<=',2)->select();
  3. print_r($ret);

1.2 NOTLIKE 模糊查询

  1. $ret = Db::table('oyk_user')->where('nickname','notlike','%编%')->select();
  2. print_r($ret);

1.3 BETWEEN 查询区间

  1. $ret = Db::table('oyk_user')->where('uid','between','5,10')->select();
  2. print_r($ret);

1.4 <> 不等于

  1. $ret = Db::table('oyk_user')->where('uid','<>',3)->select();
  2. print_r($ret);

2.请求

  1. print_r(Request::get());
  2. print_r(Request::post());

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!