0

I am trying to create the following statement:

$this->db->where('uu.usuario_grupo_id is null');

But it doesn't work

I also tried this:

$this->db->where('uu.usuario_grupo_id =', null);

$this->db->where('uu.usuario_grupo_id =', 'null');

none of these options returns data from fields referenced as null.

1

2 Answers 2

0

You can do it as below:

$this->db->where(array('uu.usuario_grupo_id' => NULL));

produces

WHERE `usuario_grupo_id` IS NULL 
Sign up to request clarification or add additional context in comments.

1 Comment

0

Try this

$this->db->where('uu.usuario_grupo_id IS NULL', null, false);

For more information look here

1 Comment

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.