From 8a8a15d157433ca5584a8914604947f41ac60b88 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 11 Jun 2024 03:04:59 +0000 Subject: [PATCH] * [misc] add getOriginTable with not table condition. --- lib/sqlparser/sqlparser.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/sqlparser/sqlparser.class.php b/lib/sqlparser/sqlparser.class.php index 10426e8d4f..02a12cd9d2 100644 --- a/lib/sqlparser/sqlparser.class.php +++ b/lib/sqlparser/sqlparser.class.php @@ -75,11 +75,20 @@ class sqlparser * Get origin table from table name or expr. * * @param string $table + * @param bool $isTable * @access public * @return string|array */ - public function getOriginTable($table) + public function getOriginTable($table, $isTable) { + if(!$isTable) + { + $parser = new sqlparser($table); + $parser->setDAO($this->dao); + $parser->parseStatement(); + return $parser->matchColumnsWithTable(); + } + $this->storeOriginTable($table); return $table;