Search code examples
symfonydoctrine-ormdql

How can I set the LIMIT 1, 4 in doctrine dql


So is it possible to set the starting point in MySQL LIMIT via the doctrine?

All I know is how to setMaxResults()...


Solution

  • You should use Query::setFirstResult($offset). See more here.