title: Select n rows without LIMIT mysql
body: <p>I have a problem. I would like to get only 300 rows from table without touching LIMIT. I need LIMIT for pagination. Is this possible in MySQL?</p>
  
  <p>My current query:</p>
  
  <pre><code>SELECT a.title, a.askprice, a.picture, a.description, a.userid, a.id 
      FROM mm_ads AS a WHERE a.category = 227 AND a.status = 1 
      ORDER BY id DESC LIMIT 40,20
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>Simple explanation: I need to get from a system last 300 ads but I need to keep pagination, because I don't want to have 300 rows listed in one page..</p>