public function is_unique($str, $field) { sscanf($field, '%[^.].%[^.]', $table, $field); return isset($this->CI->db) ? $this->CI->db->limit(1)->get_where($table, array($field => $str))->num_rows() === 0 : FALSE; }