title: Is there a workaround for using LIMIT in a subquery in MySQL?
body: <p>Here is my original query...</p>
  
  <pre><code>SELECT `id`
    FROM `properties`
   LIMIT 10, 20
  </code></pre>
  
  <p>The <code>LIMIT</code> condition is for pagination.</p>
  
  <p>Now, I have to get all like before, but I need to get only a third of rows where a condition is present.</p>
  
  <p>I came up with this, just throwing <code>LIMIT 30</code> in before I figured out how to do (total rows matched / 3) * 2.</p>
  
  <pre><code>SELECT `id`
    FROM `properties`
   WHERE `id` NOT IN (SELECT `id` 
                        FROM `properties` 
                       WHERE `vendor` = "abc" 
                    ORDER BY RAND() 
                       LIMIT 30)
  LIMIT 10, 20    
  </code></pre>
  
  <p>MySQL said...</p>
  
  <blockquote>
    <p>1235 - This version of MySQL doesn't yet support 'LIMIT &amp; IN/ALL/ANY/SOME subquery'</p>
  </blockquote>
  
  <p>I guess I can't use <code>LIMIT</code> in a subquery.</p>
  
  <p>So this is a multi question but all related...</p>
  
  <ul>
  <li>Is there a workaround for <code>LIMIT</code> in subquery?</li>
  <li>Can I select a 1/3 of matched rows with MySQL?</li>
  <li>Do I need to turn this into 2 queries, or just select all and unset the rows not required in PHP?</li>
  </ul>