php - How can I update my table after X minutes? -
how can update table after x minute action
i send request:
$req = query("update clients set lockclient = 0 id = $id")
and want create event after 5 min.
update clients set lockclient = 1 id = $id
i tried create event stored procedure , imposible
delimiter $$ create procedure proc ( idclient integer ) begin create event updateclientlock on schedule @ now() + interval 5 minute on completion not preserve enable begin update client set lockclient = 0 id = idclient ; end end$$ delimiter ;
is there way this?
by using cron job file x mins can it automatically call after specified time given