From 006ae4b70fccc1dd1c6dfeda2477ce07f2105f8d Mon Sep 17 00:00:00 2001 From: Kenio de Souza Date: Tue, 29 Jul 2025 15:25:34 -0300 Subject: [PATCH] =?UTF-8?q?Atualiza=C3=A7=C3=A3o=20Companies.class.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/model/Companies.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/model/Companies.class.php b/vendor/model/Companies.class.php index f60a8d5..9d48386 100644 --- a/vendor/model/Companies.class.php +++ b/vendor/model/Companies.class.php @@ -121,7 +121,7 @@ class Companies $this->start = $start; $this->max = $max; $this->typeSearch = $typeSearch; - $this->search = $search; + $this->search = '%'.$search.'%'; /** Verifico se há paginação */ if($this->max){ @@ -166,7 +166,7 @@ class Companies if($this->typeSearch && $this->search){ /** Preencho os parâmetros do SQL */ - $this->stmt->bindParam(':search', '%' . $this->search . '%'); + $this->stmt->bindParam(':search', $this->search); } @@ -182,7 +182,7 @@ class Companies public function Count(?int $typeSearch, ?string $search) { $this->typeSearch = $typeSearch; - $this->search = $search; + $this->search = '%'.$search.'%'; /** Consulta SQL */ $this->sql = 'select count(c.company_id) as qtde @@ -221,7 +221,7 @@ class Companies if($this->typeSearch && $this->search){ /** Preencho os parâmetros do SQL */ - $this->stmt->bindParam(':search', '%' . $this->search . '%' ); + $this->stmt->bindParam(':search', $this->search); }