We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 257715b + 80307d2 commit 26238c6Copy full SHA for 26238c6
lib/Doctrine/Query.php
@@ -1804,7 +1804,7 @@ public function getLimitSubquery()
1804
// otherwise limit would be executed after ids are reordered by distinct / group by, and that order cannot be determined.
1805
if ($driverName == 'mysql') {
1806
// assign an incremented number to each row with id
1807
- $subquery = 'SELECT @rownum:=@rownum + 1 as row_number,'
+ $subquery = 'SELECT @rownum:=@rownum + 1 as ' . $this->_conn->quoteIdentifier('row_number') . ','
1808
. ' doctrine_subquery_rownum_alias.' . $quotedIdentifierColumnName
1809
. ' FROM (' . $subquery . ') doctrine_subquery_rownum_alias,'
1810
. ' (SELECT @rownum := 0) rownum_var';
0 commit comments