summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc/hardwarequerycolumn.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics/inc/hardwarequerycolumn.inc.php')
-rw-r--r--modules-available/statistics/inc/hardwarequerycolumn.inc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/statistics/inc/hardwarequerycolumn.inc.php b/modules-available/statistics/inc/hardwarequerycolumn.inc.php
index 8aab6a54..01e32978 100644
--- a/modules-available/statistics/inc/hardwarequerycolumn.inc.php
+++ b/modules-available/statistics/inc/hardwarequerycolumn.inc.php
@@ -78,6 +78,12 @@ class HardwareQueryColumn
} else {
$other->conditions[] = $cond;
}
+ } elseif ($op === '~' || $op === '!~') {
+ $op = $op === '~' ? 'LIKE' : 'NOT LIKE';
+ $other = str_replace(array('=', '_', '%', '*', '?'), array('==', '=_', '=%', '%', '_'), $other);
+ $pid = self::getId();
+ $this->conditions[] = "{$this->tableAlias}.`$valueCol` $op (:$pid) ESCAPE '='";
+ $this->params[$pid] = $other;
} else {
$pid = self::getId();
$this->conditions[] = "{$this->tableAlias}.`$valueCol` $op (:$pid)";