Atualização Companies.class.php

This commit is contained in:
Kenio 2025-07-29 15:28:43 -03:00
parent 006ae4b70f
commit 5c3b319606

View file

@ -121,7 +121,7 @@ class Companies
$this->start = $start;
$this->max = $max;
$this->typeSearch = $typeSearch;
$this->search = '%'.$search.'%';
$this->search = !empty($search) ? '%'.$search.'%' : '';
/** Verifico se há paginação */
if($this->max){
@ -182,7 +182,7 @@ class Companies
public function Count(?int $typeSearch, ?string $search)
{
$this->typeSearch = $typeSearch;
$this->search = '%'.$search.'%';
$this->search = !empty($search) ? '%'.$search.'%' : '';
/** Consulta SQL */
$this->sql = 'select count(c.company_id) as qtde