mysql 触发器
CREATE TRIGGER tr_djmh_rescount_addAFTER 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;
页:
[1]