title: Stop Fetching data from a database after some point
body: <p>I want to fetch data from a database until a certain condition is satisfied. If this condition is satisfied I want to stop fetching after that point.</p>
  
  <pre><code>while($row=mysql_fetch_array($result1)){
  $a1=$row['Count']
  if($a1&lt;100){
  $w1=$a1
  //Now I want to stop fetching data after this point and take the variable "$w1" out
  }
  </code></pre>