summaryrefslogtreecommitdiff
path: root/includes/database/query.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/database/query.inc')
-rw-r--r--includes/database/query.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/database/query.inc b/includes/database/query.inc
index 50c106c0d..0061abe0f 100644
--- a/includes/database/query.inc
+++ b/includes/database/query.inc
@@ -1330,13 +1330,14 @@ class DatabaseCondition implements QueryConditionInterface, Countable {
'NOT IN' => array('delimiter' => ', ', 'prefix' => ' (', 'postfix' => ')'),
'IS NULL' => array('use_value' => FALSE),
'IS NOT NULL' => array('use_value' => FALSE),
+ // Use backslash for escaping wildcard characters.
+ 'LIKE' => array('postfix' => " ESCAPE '\\\\'"),
// These ones are here for performance reasons.
'=' => array(),
'<' => array(),
'>' => array(),
'>=' => array(),
'<=' => array(),
- 'LIKE' => array(),
);
if (isset($specials[$operator])) {
$return = $specials[$operator];