360°网站管家_运维学院_提供最新最全的服务器运维视频教程与网站维护视频教程

标题: mysql 触发器 [打印本页]

作者: 360网站管家    时间: 2015-9-28 17:05
标题: mysql 触发器
CREATE TRIGGER tr_djmh_rescount_add
AFTER INSERT ON t_resource_info
FOR EACH ROW
BEGIN
  if new.group_id != '2' THEN
   set @serverIp = (select `value` from t_sys_config where id=1);
   set @n =(SELECT redis_connect(@serverIp,6379));
   set @str = (select redis_incr(CONCAT('djmh_rescount_',new.group_id)));
  end if;
END;




欢迎光临 360°网站管家_运维学院_提供最新最全的服务器运维视频教程与网站维护视频教程 (http://bbs.360wzgj.com/) Powered by Discuz! X3.2