How to select rows where column value IS NOT NULL using CodeIgniter's ActiveRecord?

前端 未结 10 1827
太阳男子
太阳男子 2020-12-04 17:15

I\'m using CodeIgniter\'s Active Record class to query the MySQL database. I need to select the rows in a table where a field is not set to NULL:

$this->d         


        
10条回答
  •  悲哀的现实
    2020-12-04 17:50

    Null must not be set to string...

    $this->db->where('archived IS NOT', null);
    

    It works properly when null is not wrapped into quotes.

提交回复
热议问题