Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/survey_client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Categories/Stats.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Categories/Stats.php b/lib/Categories/Stats.php
index 41e49bd..dd0fc1b 100644
--- a/lib/Categories/Stats.php
+++ b/lib/Categories/Stats.php
@@ -125,11 +125,11 @@ class Stats implements ICategory {
* @return int
*/
protected function countEntries($tableName, $column = '*') {
+ $query = $this->connection->getQueryBuilder();
+
if ($column !== '*') {
- $column = 'DISTINCT(' . $column . ')';
+ $column = 'DISTINCT(' . $query->getColumnName($column ) . ')';
}
-
- $query = $this->connection->getQueryBuilder();
$query->selectAlias($query->createFunction('COUNT(' . $column . ')'), 'num_entries')
->from($tableName);
$result = $query->execute();