diff options
author | Simon Rettberg | 2021-12-17 11:28:42 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-12-17 11:28:42 +0100 |
commit | 1f3325fa0a0b2630014d531adb6957ab959de20f (patch) | |
tree | c1bac3cbf12af349ca49fd0313e85d6079514337 | |
parent | [eventlog] Add english translations (diff) | |
download | slx-admin-1f3325fa0a0b2630014d531adb6957ab959de20f.tar.gz slx-admin-1f3325fa0a0b2630014d531adb6957ab959de20f.tar.xz slx-admin-1f3325fa0a0b2630014d531adb6957ab959de20f.zip |
[statistics] Fix query building
-rw-r--r-- | modules-available/statistics/inc/hardwarequery.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/statistics/inc/hardwarequery.inc.php b/modules-available/statistics/inc/hardwarequery.inc.php index 2cded089..24b27190 100644 --- a/modules-available/statistics/inc/hardwarequery.inc.php +++ b/modules-available/statistics/inc/hardwarequery.inc.php @@ -79,15 +79,16 @@ class HardwareQuery $this->joins[$prop] = "INNER JOIN $table $tid ON ($srcTable.$column = $tid.$column AND $tid.prop = :$pid)"; $this->args[$pid] = $prop; + $this->columns[$prop] = "$tid.`value` AS `$prop`"; } $jtid = $this->id(); $cond = ''; if (!empty($condColumn)) { $vid = $this->id(); if (is_array($condVal)) { - $cond = " AND $jtid.`$condColumn` IN (:vid)"; + $cond = " AND $jtid.`$condColumn` IN (:$vid)"; } else { - $cond = " AND $jtid.`$condColumn` = :vid"; + $cond = " AND $jtid.`$condColumn` = :$vid"; } $this->args[$vid] = $condVal; } |