码迷,mamicode.com
首页 > Web开发 > 详细

php where 各种子句

时间:2019-07-16 22:43:45      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:from   rom   cat   之间   sel   class   and   种子   span   

$sql = "select * from  goods where goods_name in(‘海尔‘,‘海尔x1‘) "; //in 输出goods_name等于海尔和海尔x1的字段
$sql = "select * from  goods where price between 4000 and 5000"; //between and 输出price4000到5000之间的值
$sql = "select * from  goods where cat_id is  null"; //is 或者 is not null 为null值 不可写成(cat_id=null)是错的

 

php where 各种子句

标签:from   rom   cat   之间   sel   class   and   种子   span   

原文地址:https://www.cnblogs.com/xm666/p/11197941.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!