How to delete mysql row after time passes?

You can use PHP script and use cron job on your cpanel.

Example:

cronjobcommand.php

<?php 
 include 'your_db_connection';
 mysql_query("DELETE FROM your_table_name WHERE Date < NOW()");
?>

I have attached a screenshot below for your more reference.

enter image description here

Leave a Comment