From: Joas Schilling Date: Tue, 16 Apr 2019 09:43:12 +0000 (+0200) Subject: Allow to use Subqueries in from X-Git-Tag: v17.0.0beta1~550^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f906913177cbb511ee3dd00a9920a7626ef8e751;p=nextcloud-server.git Allow to use Subqueries in from Signed-off-by: Joas Schilling --- 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); }