summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Utils/Query.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Utils/Query.php b/src/Utils/Query.php
index 4325b65..ab2849b 100644
--- a/src/Utils/Query.php
+++ b/src/Utils/Query.php
@@ -295,7 +295,14 @@ class Query
$flags['is_export'] = true;
}
- foreach ($statement->expr as $expr) {
+ $expressions = $statement->expr;
+ if (!empty($statement->join)) {
+ foreach ($statement->join as $join) {
+ $expressions[] = $join->expr;
+ }
+ }
+
+ foreach ($expressions as $expr) {
if (!empty($expr->function)) {
if ($expr->function === 'COUNT') {
$flags['is_count'] = true;