diff --git a/vendor/model/FinancialCategories.class.php b/vendor/model/FinancialCategories.class.php index 1f29773..608a5df 100644 --- a/vendor/model/FinancialCategories.class.php +++ b/vendor/model/FinancialCategories.class.php @@ -140,7 +140,7 @@ class FinancialCategories /** Verifica se alguma descrição foi informada */ if($this->description){ - $this->sql .= ' and description like (:description) '; + $this->sql .= ' and description like concat(\'%\', :description, \'%\') '; } @@ -150,8 +150,6 @@ class FinancialCategories /** Verifica se alguma descrição foi informada */ if($this->description){ - $this->description = '%'.$this->description.'%'; - /** Preencho os parâmetros do SQL */ $this->stmt->bindParam(':description', $this->description); @@ -180,7 +178,7 @@ class FinancialCategories /** Verifica se alguma descrição foi informada */ if($this->description){ - $this->sql .= ' and description like (:description) '; + $this->sql .= ' and description like concat(\'%\', :description, \'%\') '; } @@ -190,8 +188,6 @@ class FinancialCategories /** Verifica se alguma descrição foi informada */ if($this->description){ - $this->description = '%'.$this->description.'%'; - /** Preencho os parâmetros do SQL */ $this->stmt->bindParam(':description', $this->description);