db ->where($this->unique_key($value), $value) ->count_records($this->table_name); } public function name_not_exists() { return (bool) ! $this->db ->where(array('name' => $this->name, 'id !=' => $this->id)) ->count_records($this->table_name); } }