title: Doctrine - select last 4 rows from table
body: <p>I'm using Symfony/Doctrine. 
  I'm trying to select last 4 rows from table, but im getting error.</p>
  
  <pre><code>$em = $this-&gt;getDoctrine()-&gt;getEntityManager();
  $query = $em-&gt;createQuery(
  'SELECT c FROM DprocMainBundle:Courses c ORDER BY id DESC LIMIT 4'
  );
  
  $course = $query-&gt;getResult();
  </code></pre>
  
  <p>This is my query but it shows error. </p>
  
  <blockquote>
    <p>Expected end of string, got 'LIMIT'</p>
  </blockquote>
  
  <p>How should i use limit, and get the LAST 4 rows?</p>
  
  <p>thanks!</p>