1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/12671] Possibility to use NOT LIKE expression

PHPBB3-12671
This commit is contained in:
Geolim4
2014-08-08 15:06:12 +02:00
parent f6da266109
commit 6b60153ab4
11 changed files with 137 additions and 0 deletions

View File

@@ -369,6 +369,17 @@ abstract class driver implements driver_interface
return $this->_sql_like_expression('LIKE \'' . $this->sql_escape($expression) . '\'');
}
/**
* {@inheritDoc}
*/
function sql_not_like_expression($expression)
{
$expression = utf8_str_replace(array('_', '%'), array("\_", "\%"), $expression);
$expression = utf8_str_replace(array(chr(0) . "\_", chr(0) . "\%"), array('_', '%'), $expression);
return $this->_sql_like_expression('NOT LIKE \'' . $this->sql_escape($expression) . '\'');
}
/**
* {@inheritDoc}
*/