TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER t_answer_insert_after AFTER INSERT ON qa_answer\n	FOR EACH ROW BEGIN\n		# 添加一个答案则在相应的问题表中更新答案数量等\n		UPDATE qa_question SET q_answer_quantity = q_answer_quantity+1, q_lastanswer_time =  NEW.a_answer_time, q_lastanswer_id = NEW.a_owner_id  WHERE q_id = NEW.q_id;\n	END' 'CREATE DEFINER=`root`@`localhost` TRIGGER t_answer_delete_after AFTER DELETE ON qa_answer\n	FOR EACH ROW BEGIN\n		# 删除一个答案则在相应的问题表中更新答案数量(先判断对应问题是否存在)\n		IF EXISTS(SELECT * FROM qa_question WHERE q_id=OLD.q_id) THEN\n			UPDATE qa_question SET q_answer_quantity = q_answer_quantity-1   WHERE q_id = OLD.q_id;\n		END IF;\n	END'
sql_modes=524288 524288
definers='root@localhost' 'root@localhost'
client_cs_names='utf8' 'utf8'
connection_cl_names='utf8_general_ci' 'utf8_general_ci'
db_cl_names='utf8_general_ci' 'utf8_general_ci'
