title: How can I get the row number of results querying with DQL(Doctrine)
body: <p>example: SELECT title,ROW_NUM FROM article ORDER BY count_read.
  What should ROW_NUM be replace by ?</p>
  
  <p>I don't like to after getting the results generate the index by program, because I want to  insert into a table Rank with the result data by querying the example DQL above. </p>
  
  <p>What I want to achieve maybe like :</p>
  
  <pre><code>"INSERT INTO RANK r (title, index, lastIndex)
  SELECT title,ROW_NUM,(SELECT index FROM RANK WHERE id = :id - 1) FROM article ORDER BY count_read"
  </code></pre>
  
  <p>Thanks in advance..</p>