mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 23:16:13 +02:00
[ticket/12671] Possibility to use NOT LIKE expression
PHPBB3-12671
This commit is contained in:
parent
635cde218c
commit
db0815f680
@ -277,7 +277,7 @@ class sqlite extends \phpbb\db\driver\driver
|
|||||||
*/
|
*/
|
||||||
function sql_like_expression($expression)
|
function sql_like_expression($expression)
|
||||||
{
|
{
|
||||||
// Unlike LIKE, GLOB is case sensitive (unfortunatly). SQLite users need to live with it!
|
// Unlike LIKE, GLOB is unfortunately case sensitive.
|
||||||
// We only catch * and ? here, not the character map possible on file globbing.
|
// 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(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
|
||||||
|
|
||||||
@ -290,11 +290,11 @@ class sqlite extends \phpbb\db\driver\driver
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* For SQLite an underscore is a not-known character... this may change with SQLite3
|
* For SQLite an underscore is a not-known character...
|
||||||
*/
|
*/
|
||||||
function sql_not_like_expression($expression)
|
function sql_not_like_expression($expression)
|
||||||
{
|
{
|
||||||
// Unlike NOT LIKE, NOT GLOB is case sensitive (unfortunatly). SQLite users need to live with it!
|
// Unlike NOT LIKE, NOT GLOB is unfortunately case sensitive.
|
||||||
// We only catch * and ? here, not the character map possible on file globbing.
|
// 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(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
|
||||||
|
|
||||||
|
@ -260,11 +260,11 @@ class sqlite3 extends \phpbb\db\driver\driver
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* For SQLite an underscore is a not-known character...
|
* For SQLite an underscore is an unknown character.
|
||||||
*/
|
*/
|
||||||
public function sql_like_expression($expression)
|
public function sql_like_expression($expression)
|
||||||
{
|
{
|
||||||
// Unlike LIKE, GLOB is case sensitive (unfortunatly). SQLite users need to live with it!
|
// Unlike LIKE, GLOB is unfortunately case sensitive.
|
||||||
// We only catch * and ? here, not the character map possible on file globbing.
|
// 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(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
|
||||||
|
|
||||||
@ -277,11 +277,11 @@ class sqlite3 extends \phpbb\db\driver\driver
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* For SQLite an underscore is a not-known character...
|
* For SQLite an underscore is an unknown character.
|
||||||
*/
|
*/
|
||||||
public function sql_not_like_expression($expression)
|
public function sql_not_like_expression($expression)
|
||||||
{
|
{
|
||||||
// Unlike NOT LIKE,NOT GLOB is case sensitive (unfortunatly). SQLite users need to live with it!
|
// Unlike NOT LIKE, NOT GLOB is unfortunately case sensitive
|
||||||
// We only catch * and ? here, not the character map possible on file globbing.
|
// 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(chr(0) . '_', chr(0) . '%'), array(chr(0) . '?', chr(0) . '*'), $expression);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user