title: mysql select statement with limit offset bigger than actually records
body: <p>I create an mysql-statement that paginates the results using <code>LIMIT x, n</code> (where <code>x</code> is the offset and <code>n</code> the returned entries).</p>
  
  <p>The offset is created using GET-Vars in the form of <code>page=x</code>.</p>
  
  <p>Now Google has some strange entries in its index that come from old crawls, where the page-variable exceeds the actual amount of records in the result-set.</p>
  
  <p>Means, the query created with the page variable results in something like <code>LIMIT 1000, 30</code> - but the query will only return <code>900</code> entries (since the content of the table changed meanwhile. This returns an empty result-set, of course.</p>
  
  <p>Is there a way to tell mysql, that if the offset exceeds the returned records to just show the last possible result-set? I don't want to make an extra query using <code>COUNT()</code> first, since this would double the load on the mysql-server (right now I'm using <code>SQL_CALC_FOUND_ROWS</code> to determine the total amount of records the query would return without the <code>LIMIT</code>-Statement.</p>