Home >Database >Mysql Tutorial >sql determines whether a field is empty

sql determines whether a field is empty

PHP中文网
PHP中文网Original
2017-07-03 17:30:112568browse

Determine whether a certain field in sql is NULL

<span style="color: #000000">public function dataNull($id){
        $sql = 'SELECT * FROM `vvt_company_funcs_user` WHERE ISNULL(`last_login_time`) AND id ='. $id;
        $res = $this->query($sql);
        return $res;
    }
    </span>

The above is the detailed content of sql determines whether a field is empty. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn