Commit 39d06d95 authored by Bjarne Rest's avatar Bjarne Rest Committed by Alexander Butenko

Fixed groupBy with spaces in field declaration (#683)

* Fixed groupBy with saces in field declaration

Sometimes you have to use GROUP BY in SQL with Spaces in it. The old implementation deleted all spaces in $groupByField
Eg "IF(qv.idValue IS NULL, UUID(), qv.idValue)" would become "IF(qv.idValueISNULL,UUID(),qv.idValue)"

* Addes operators <>=! to groupBy
parent 6e13d5a8
...@@ -1194,7 +1194,7 @@ class MysqliDb ...@@ -1194,7 +1194,7 @@ class MysqliDb
*/ */
public function groupBy($groupByField) public function groupBy($groupByField)
{ {
$groupByField = preg_replace("/[^-a-z0-9\.\(\),_\*]+/i", '', $groupByField); $groupByField = preg_replace("/[^-a-z0-9\.\(\),_\* <>=!]+/i", '', $groupByField);
$this->_groupBy[] = $groupByField; $this->_groupBy[] = $groupByField;
return $this; return $this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment