wordpress换域名后网站地址怎么办,孝感网站开发找优搏,网站建设到发布2012sevser,网络营销是什么专业学的二、适用范围对于每隔一段时间就有固定需求的操作#xff0c;如创建表#xff0c;删除数据等操作#xff0c;可以使用event来处理。例如#xff1a;使用event在每月的1日凌晨1点自动创建下个月需要使用的三张表。三、使用权限开启event #xff1a;(1)执行 SET GLOBAL eve…二、适用范围对于每隔一段时间就有固定需求的操作如创建表删除数据等操作可以使用event来处理。例如使用event在每月的1日凌晨1点自动创建下个月需要使用的三张表。三、使用权限开启event (1)执行 SET GLOBAL event_scheduler 1;(2)在mysql配置文件中设置event_schedulerON查看event (1)SHOW VARIABLES LIKE event_scheduler; (2)要求东八区 show variables like %time_zone%;eg:早上5点往t_bb_register_loan中插入数据create EVENT bb_register_loan_to_everydayon SCHEDULE every 1 day starts timestamp 2015-05-30 05:00:00doinsert into t_bb_register_loan(createTime,userId,nickName,realName,idCardNo,mobile,registerTime,inviterNickName,loanId,investAmount,investTime,qx,amount,redAmount,coupon,returnAmount)selectNOW(),b.userid,b.nickName,b.realName,b.idCardNo,b.mobile,b.registerTime,(select u.nickname from user_main u where u.mobiles.mobile),a.loanid,a.investAmount,a.investTime,CONCAT(a.termCount,if(a.termUnit1,天,if(a.termUnit2,周,月))),a.amount,a.red_money_amount,a.coupon,a.returnAmountfrom user_main bleft join (select a.loanid,c.title,c.termCount,c.termUnit,c.amount,c.openTime,c.fullTime,a.investAmount,a.investTime,a.investorUserId,a.red_money_amount,t.coupon,t.returnAmountfrom loan_investor a,loan c,(select t.loanid,t.LOAN_INVESTOR_ID,r.coupon,r.returnAmount from trade t left join t_requestcouponrecord r on t.couponidr.id where SERIAL_NUMBER like 05% and t.TRADE_STATUSSUCCESS)twhere a.loanid c.loanid anda.loanidt.loanid and a.idt.LOAN_INVESTOR_ID anda.investTime DATE_FORMAT(SUBDATE(now(),interval 1 day),%Y-%m-%d) and a.investTime)a on a.investorUserId b.useridleft join user_invited_code d on b.useridd.useridleft join(select r.mobile,r.userid,IFNULL(recommendcode,r.mobile) code from t_recommendinfo r) s on s.useridb.useridwhere b.registerTime DATE_FORMAT(SUBDATE(now(),interval 1 day),%Y-%m-%d) and b.registerTime删除event : drop event if exists bb_register_loan_to_everyday;查询select * from mysql.event