From e0a825658da5bdbfc41e6b0ac965342f424db2c6 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 16 Apr 2019 11:43:12 +0200 Subject: [PATCH] Allow to use Subqueries in from Signed-off-by: Joas Schilling --- lib/private/DB/QueryBuilder/QueryBuilder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index ebbcdeb087..25d59fb7d7 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -1170,6 +1170,10 @@ class QueryBuilder implements IQueryBuilder { * @return string */ public function getTableName($table) { + if ($table instanceof IQueryFunction) { + return (string) $table; + } + $table = $this->prefixTableName($table); return $this->helper->quoteColumnName($table); }