Fix SQL syntax error on MariaDB 10.2 (#5774) (#6833)

Backported from 1.3 release to the 1.1 LTS release.
release-1.1
Mark Scarbrough 5 years ago committed by Aleksander Machniak
parent fe0dc4eef8
commit d0a14ffc05

@ -481,7 +481,7 @@ class rcube_contacts extends rcube_addressbook
// 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".
@ -494,7 +494,7 @@ class rcube_contacts extends rcube_addressbook
$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'];
}

Loading…
Cancel
Save