如何查找数据库中某字段不为空的记录
有字段CN,如何查找字段CN不为空的记录? if($fl){if ($fl=="cn") $this->db->where('cn !=', 'NULL');
if ($fl=="hk") $this->db->where('hk !=', 'NULL');
} if($fl){
if ($fl=="cn") $this->db->where('cn !=', '');
if ($fl=="hk") $this->db->where('hk !=', '');
} 本帖最后由 zhouli520 于 2011-5-30 12:33 编辑
where cn is not null $this->db->where('length(trim(cn)) !=', "''", false);
页:
[1]