请教各位一下,
想实现一个类似淘宝的,支付的功能,购买商品7天后自动转账给商家。
开发语言php , 服务器 Linux
那位大侠给个思路或解决方案
尝试一下
set global event_scheduler =1;
show variables like 'event_scheduler';
DROP PROCEDURE IF EXISTS p_test;
use mydb;
CREATE PROCEDURE p_test()
BEGIN
update myguests set reg_date = now() where id=1;
select * from myguests;
END
DROP EVENT IF EXISTS e_test;
CREATE EVENT e_test
ON SCHEDULE EVERY 10 second STARTS TIMESTAMP '2018-09-13 16:00:00'
ON COMPLETION PRESERVE
DO
BEGIN
CALL p_test();
END
使用linux的定时, 执行php任务