mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1558: MSSQL2000 setFirstResult() Bug #1956
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 23, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user dingdangjyz:
$q = $em->createQuery("select c from Entities\CityGuide c")->setFirstResult(3)->setMaxResults(10);
$user = $q->getResult();
Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]'ROW_NUMBER' Not a recognized function name。' in E:\xampp\htdocs\D\Doctrine\DBAL\Connection.php:618 Stack trace: #0 E:\xampp\htdocs\D\Doctrine\DBAL\Connection.php(618): PDO->query('SELECT * FROM (...') #1 E:\xampp\htdocs\D\Doctrine\ORM\Query\Exec\SingleSelectExecutor.php(46): Doctrine\DBAL\Connection->executeQuery('SELECT * FROM (...', Array, Array) #2 E:\xampp\htdocs\D\Doctrine\ORM\Query.php(249): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #3 E:\xampp\htdocs\D\Doctrine\ORM\AbstractQuery.php(607): Doctrine\ORM\Query->_doExecute() #4 E:\xampp\htdocs\D\Doctrine\ORM\AbstractQuery.php(413): Doctrine\ORM\AbstractQuery->execute(Array, 1) #5 E:\xampp\htdocs\D\y.php(67): Doctrine\ORM\AbstractQuery->getResult() #6 {main} thrown in E:\xampp\htdocs\D\Doctrine\DBAL\Connection.php on line 618
@doctrinebot commented on GitHub (Jan 9, 2012):
Comment created by @beberlei:
We don't really support SQL Server 2000 anymore (>= 2005).
This is one case, however SQL Server 2000 itself does not support limit with offsets itself (at least i found no way). However if you have a way, you can create your own database platform extending Doctrine\DBAL\Platforms\MsSQLPlatform and overriding the modifyLimitQuery() method.
@doctrinebot commented on GitHub (Jan 9, 2012):
Issue was closed with resolution "Invalid"