Hi,
I am trying to learn is that compare the row 'item_exp' to the current time, if the time has passed, the record needs to be remove from the database.
I will use cronjob to run it.
Please suggest.
TIA
I am trying to learn is that compare the row 'item_exp' to the current time, if the time has passed, the record needs to be remove from the database.
I will use cronjob to run it.
Code:
$SQL = "Delete from $store_item where item_exp < UNIX_TIMESTAMP (date_sub(now() interval 1 day))";
Please suggest.
TIA