Mysql trigger problem, I want to delete the content of an article and the comments about this article in another table will also be deleted at the same time. How to write this?
delimiter //
create trigger tr_cno before delete on wenzhnag for each row
begin
delete from choose where content= old.content;
end;
//
delimiter ;
delete from pinglun where content='';
i It was originally written like this but I keep getting errors
Please tell me how to write this
This operation does not require MYSQL. It is written in PHP. Just query the comments under the article and then delete the article and comments at the same time.