From 635cde218c786f76397c3354e59f96a8a151c132 Mon Sep 17 00:00:00 2001 From: Geolim4 Date: Sat, 9 Aug 2014 15:04:39 +0200 Subject: [ticket/12671] Possibility to use NOT LIKE expression PHPBB3-12671 --- phpBB/phpbb/db/driver/sqlite.php | 4 ++-- phpBB/phpbb/db/driver/sqlite3.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php index 841662c1ed..68372200b6 100644 --- a/phpBB/phpbb/db/driver/sqlite.php +++ b/phpBB/phpbb/db/driver/sqlite.php @@ -294,14 +294,14 @@ class sqlite extends \phpbb\db\driver\driver */ function sql_not_like_expression($expression) { - // Unlike LIKE, GLOB is case sensitive (unfortunatly). SQLite users need to live with it! + // Unlike NOT LIKE, NOT GLOB is case sensitive (unfortunatly). SQLite users need to live with it! // We only catch * and ? here, not the character map possible on file globbing. $expression = str_replace(array(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression); $expression = str_replace(array('?', '*'), array("\?", "\*"), $expression); $expression = str_replace(array(chr(0) . "\?", chr(0) . "\*"), array('?', '*'), $expression); - return 'GLOB \'' . $this->sql_escape($expression) . '\''; + return 'NOT GLOB \'' . $this->sql_escape($expression) . '\''; } /** diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php index f79245afb1..2bf4ed51aa 100644 --- a/phpBB/phpbb/db/driver/sqlite3.php +++ b/phpBB/phpbb/db/driver/sqlite3.php @@ -281,14 +281,14 @@ class sqlite3 extends \phpbb\db\driver\driver */ public function sql_not_like_expression($expression) { - // Unlike LIKE, GLOB is case sensitive (unfortunatly). SQLite users need to live with it! + // Unlike NOT LIKE,NOT GLOB is case sensitive (unfortunatly). SQLite users need to live with it! // We only catch * and ? here, not the character map possible on file globbing. $expression = str_replace(array(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression); $expression = str_replace(array('?', '*'), array("\?", "\*"), $expression); $expression = str_replace(array(chr(0) . "\?", chr(0) . "\*"), array('?', '*'), $expression); - return 'GLOB \'' . $this->sql_escape($expression) . '\''; + return 'NOT GLOB \'' . $this->sql_escape($expression) . '\''; } /** -- cgit v1.2.1