Loading

php where 各种子句

$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)是错的

 

posted @ 2019-07-16 22:23  mingBolg  阅读(951)  评论(0编辑  收藏  举报