title: Selecting data from DB using LIMIT
body: <p>I have a total of 5000 rows in my database. Now, what i want to achieve is, my supervisor script should be able to select 1000 at a time and a record selected before shouldn't be selected any longer.  I could achieve this by <code>toggling status</code> for a selected row but is there a way i can achieve this with LIMIT?</p>
  
  <p>In the query below, i am selecting the data in batches of 1000. After the first 1000 rows is processed, the script must select another 1000 unique rows. Is there a way to achieve that with LIMITS ?</p>
  
  <p><strong>Index.php</strong></p>
  
  <pre><code> $sql = "select * from `table` where `crude_at` between '".$date_from."' 
   and '".$date_to."' LIMIT 1000";   
   $res  = $mysqli-&gt;query($sql);
  
      while($row = mysqli_fetch_assoc($res)){
       $no_of_counts = 0
      //do something for the selected rows here
      $no_of_counts++        
      if ($no_of_counts == '1000')
      {
          //fetch the next 1000 rows
      }
      }
  </code></pre>