900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > mysql 查询某个字段不为空(附thinkphp写法)

mysql 查询某个字段不为空(附thinkphp写法)

时间:2021-07-08 07:21:38

相关推荐

mysql 查询某个字段不为空(附thinkphp写法)

1.如果要写某个字段不为空,mysql的表达式应为:

假设字段为:door_open_api_key,

那么:door_open_api_key is not null AND door_open_api_key != ""

2. thinkphp中应写为

$Reserve_system = M('Reserve_system');

$where = array();

$where['door_open_api_key'] = array('exp',' is not null AND door_open_api_key != ""');

$reserve_systems = $Reserve_system->where($where)->select();

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。