title: Auto delete Expired Data Row in MySQL
body: <p>I have added some bonus code rows into my bonusdetails table in the database. All bonus codes have an expiry date.</p>
  
  <p>Is it possible to automatically delete the row that its expiry date has reached by php? Code I'm using is(Validity is date):-</p>
  
  <pre><code>$query = "select * 
            from bonusdetails 
            where BonusType='Match Bonus' 
            order by Validity ASC limit 0,30;";
  
  $result = mysql_query($query);
  
  echo '&lt;table&gt;';
  .....
  .....
  .....
  echo '&lt;/table&gt;';
  
  ?&gt;
  </code></pre>