Skip to content

Commit

Permalink
Fix SQL syntax error on MariaDB 10.2 (roundcube#5774)
Browse files Browse the repository at this point in the history
Backported from 1.3 release to the 1.1 LTS release.
  • Loading branch information
markscarbrough authored Jul 3, 2019
1 parent fe0dc4e commit 910030b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ private function _count()

// count contacts for this user
$sql_result = $this->db->query(
"SELECT COUNT(c.`contact_id`) AS rows".
"SELECT COUNT(c.`contact_id`) AS cnt".
" FROM " . $this->db->table_name($this->db_name, true) . " AS c".
$join.
" WHERE c.`del` <> 1".
Expand All @@ -494,7 +494,7 @@ private function _count()

$sql_arr = $this->db->fetch_assoc($sql_result);

$this->cache['count'] = (int) $sql_arr['rows'];
$this->cache['count'] = (int) $sql_arr['cnt'];

return $this->cache['count'];
}
Expand Down

0 comments on commit 910030b

Please sign in to comment.