Quote also column aliases in sql tables, otherwise they will be returned uppercase in Oracle
This commit is contained in:
parent
d2e7c27bf4
commit
9e49c5c83b
1 changed files with 2 additions and 2 deletions
|
@ -468,7 +468,7 @@ class kolab_storage_cache
|
||||||
|
|
||||||
// fetch full object data on one query if a small result set is expected
|
// fetch full object data on one query if a small result set is expected
|
||||||
$fetchall = !$uids && ($this->limit ? $this->limit[0] : $this->count($query)) < 500;
|
$fetchall = !$uids && ($this->limit ? $this->limit[0] : $this->count($query)) < 500;
|
||||||
$sql_query = "SELECT " . ($fetchall ? '*' : '`msguid` AS _msguid, `uid`') . " FROM `{$this->cache_table}` ".
|
$sql_query = "SELECT " . ($fetchall ? '*' : '`msguid` AS `_msguid`, `uid`') . " FROM `{$this->cache_table}` ".
|
||||||
"WHERE `folder_id` = ? " . $this->_sql_where($query);
|
"WHERE `folder_id` = ? " . $this->_sql_where($query);
|
||||||
if (!empty($this->order_by)) {
|
if (!empty($this->order_by)) {
|
||||||
$sql_query .= ' ORDER BY ' . $this->order_by;
|
$sql_query .= ' ORDER BY ' . $this->order_by;
|
||||||
|
@ -551,7 +551,7 @@ class kolab_storage_cache
|
||||||
$this->_read_folder_data();
|
$this->_read_folder_data();
|
||||||
|
|
||||||
$sql_result = $this->db->query(
|
$sql_result = $this->db->query(
|
||||||
"SELECT COUNT(*) AS numrows FROM `{$this->cache_table}` ".
|
"SELECT COUNT(*) AS `numrows` FROM `{$this->cache_table}` ".
|
||||||
"WHERE `folder_id` = ?" . $this->_sql_where($query),
|
"WHERE `folder_id` = ?" . $this->_sql_where($query),
|
||||||
$this->folder_id
|
$this->folder_id
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue