where 条件 ->where("type",null) //判断为空 ->where("type",'not null') //判断不为空 完整DB查询语句 Db::table('user') ->where("type",'not null') ->select(); 详情请看tp框架原文 :https://www.kancloud.cn/manual/thinkphp5/135182