From f906913177cbb511ee3dd00a9920a7626ef8e751 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 ebbcdeb0870..25d59fb7d7d 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); } -- 2.39.5