summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Utils/Query.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Utils/Query.php b/src/Utils/Query.php
index 0d53920..c5931c9 100644
--- a/src/Utils/Query.php
+++ b/src/Utils/Query.php
@@ -6,6 +6,7 @@
namespace PhpMyAdmin\SqlParser\Utils;
+use PhpMyAdmin\SqlParser\Components\CaseExpression;
use PhpMyAdmin\SqlParser\Components\Expression;
use PhpMyAdmin\SqlParser\Lexer;
use PhpMyAdmin\SqlParser\Parser;
@@ -442,6 +443,8 @@ class Query
if (!in_array($arr, $ret['select_tables'])) {
$ret['select_tables'][] = $arr;
}
+ } elseif ($expr instanceof CaseExpression) {
+ $ret['select_expr'][] = CaseExpression::build($expr);
} else {
$ret['select_expr'][] = $expr->expr;
}