Codeigniter Where is the item

Somehow its a little difficult to create such a request for me: Give me all the navigation entries where linkname is not null

$query = $this->db->get_where('navigation',array('linkname'!==NULL)); 

Giving me errors

Unknown column "0" in the "where" section

SELECT linkname , idnavigation FROM ( navigation ) WHERE 0 = 1

Any clues with this?

+3
source share
4 answers

You can simply write the WHERE manually as follows:

 $this->db->get_where('navigation', 'linkname IS NOT NULL'); 
+12
source

It:

 $query = $this->db->get_where('navigation',array('linkname !=' => NULL)); 
+1
source

Try this one ...

 $this->db->select("*) ->from("table_name") ->where("your_id <>",''); 
+1
source
 $this->db->where('linkname !==', NULL); $query = $this->db->get('navigation'); 
-2
source

All Articles