Php 使用codeigniter查询选择属性设置为null的字段
我试图创建以下语句:Php 使用codeigniter查询选择属性设置为null的字段,php,postgresql,codeigniter,Php,Postgresql,Codeigniter,我试图创建以下语句: $this->db->where('uu.usuario\u grupo\u id为null')您可以按以下方式执行: $this->db->where(array('uu.usuario_grupo_id' => NULL)); 产生 WHERE `usuario_grupo_id` IS NULL 试试这个 $this->db->where('uu.usuario_grupo_id IS NULL', null, false);
$this->db->where('uu.usuario\u grupo\u id为null')代码>您可以按以下方式执行:
$this->db->where(array('uu.usuario_grupo_id' => NULL));
产生
WHERE `usuario_grupo_id` IS NULL
试试这个
$this->db->where('uu.usuario_grupo_id IS NULL', null, false);
有关更多信息,请查看