您当前的位置: 首页 >  sql
  • 0浏览

    0关注

    1477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

软件工程小施同学 发布时间:2017-11-18 11:43:56 ,浏览量:0

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();

关注
打赏
1665320866
查看更多评论
立即登录/注册

微信扫码登录

0.0453s