Quote columns in ORDER BY

This commit is contained in:
Aleksander Machniak 2014-09-17 19:50:26 +02:00
parent 9e49c5c83b
commit e9e871a43f

View file

@ -593,7 +593,7 @@ class kolab_storage_cache
public function set_order_by($sortcols) public function set_order_by($sortcols)
{ {
if (!empty($sortcols)) { if (!empty($sortcols)) {
$this->order_by = join(', ', (array)$sortcols); $this->order_by = '`' . join('`, `', (array)$sortcols) . '`';
} }
else { else {
$this->order_by = null; $this->order_by = null;