From d5eb68b27c779e2e7539838b8924c28ff7f89301 Mon Sep 17 00:00:00 2001 From: Bjverde Date: Wed, 6 Jul 2022 14:34:12 -0300 Subject: [PATCH] :hammer: BASE #268 alterando forma do like --- base/classes/helpers/SqlHelper.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/classes/helpers/SqlHelper.class.php b/base/classes/helpers/SqlHelper.class.php index 34ee56cd..0668be93 100644 --- a/base/classes/helpers/SqlHelper.class.php +++ b/base/classes/helpers/SqlHelper.class.php @@ -212,7 +212,11 @@ public static function getSqlTypeTextLike( $stringWhere $testZero = empty($testZero)?true:$testZero; $connector = empty($connector)?self::SQL_CONNECTOR_AND:$connector; $value = self::explodeTextString($value); - $isTrue = EOL.' AND '.$attribute.' like \'%'.$value.'%\' '; + if ( self::getDbms() == DBMS_SQLSERVER ) { + $isTrue = EOL.' AND '.$attribute.' like \'%'.$value.'%\' COLLATE Latin1_General_CI_AI'; + } else { + $isTrue = EOL.' AND '.$attribute.' like \'%'.$value.'%\' '; + } $attribute = self::attributeIssetOrNotZero($arrayWhereGrid,$attribute,$isTrue,null,$testZero); $stringWhere = $stringWhere.$attribute; return $stringWhere;