I want to run a cronjob which check in db table where timespamp is less than current time + 1 month. But not sure how can i do that.
I have tried something but that not works.
$buy_time=strtotime($row['sdate']);
$current_time= strtotime("now");
$diff=$current_time - $buy_time;
$SQL = "UPDATE product SET status=0 WHERE sdate <'$diff'";
$res= mysqli_query($link,$SQL);