From ad4143771cc5f4601117d6e3427f9e5913f3841f Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 13 Nov 2017 11:51:25 +0100 Subject: [PATCH] Make LIKE sql WHERE clause lower case --- build/orm/core/SQLBuilder.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/orm/core/SQLBuilder.php b/build/orm/core/SQLBuilder.php index 24a907e..8cdf0f6 100755 --- a/build/orm/core/SQLBuilder.php +++ b/build/orm/core/SQLBuilder.php @@ -132,7 +132,10 @@ /* [1] On construit la requête =========================================================*/ /* (1) Chamo */ - $sql .= $field[0].'.'.$field[1].' '; + if( $value[1] == Rows::COND_LIKE ) // make LIKE lowercase + $sql .= 'LOWER('.$field[0].'.'.$field[1].') '; + else + $sql .= $field[0].'.'.$field[1].' '; /* (2) Opérateur */ $sql .= substr($value[1], 2, -2).' '; @@ -143,7 +146,7 @@ $sql .= 'NULL'; return $sql; } - + // {2} Si not NULL // $sql .= ':'.$field[0].'_x_'.$field[1].'_'.$offset;