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


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -