标题: 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;