Visitor count fix

This commit is contained in:
2020-07-18 12:51:36 +02:00
parent 5254f3488b
commit 852d94e736
6 changed files with 32 additions and 4 deletions

View File

@@ -303,6 +303,8 @@ abstract class SQL {
public function count($col = NULL) {
if (is_null($col)) {
return new Keyword("COUNT(*) AS count");
} else if($col instanceof Keyword) {
return new Keyword("COUNT(" . $col->getValue() . ") AS count");
} else {
$countCol = strtolower(str_replace(".","_", $col)) . "_count";
$col = $this->columnName($col);