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.

KUMAR
  • 1,993
  • 2
  • 9
  • 26

2 Answers2

0

You can do it as below:

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

produces

WHERE `usuario_grupo_id` IS NULL 
dev_mustafa
  • 1,042
  • 1
  • 4
  • 14
0

Try this

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

For more information look here

mail2bapi
  • 1,547
  • 1
  • 12
  • 18