public function existeNome($nome, $id) { $queryString = "desc_apartamento ilike '{$nome}'"; if ($id) { $queryString .= " AND cd_apartamento != {$id}"; } $return = $this->dao->get($queryString); return count($return) > 0 ? false : true; }
public function existeNome($nome, $id) { $queryString = "nm_setor ilike '{$nome}'"; if ($id) { $queryString .= " AND cd_setor != {$id}"; } $return = $this->dao->get($queryString); return count($return) > 0 ? false : true; }