mysql trigger
Y.A
Y.A 2018-06-21 10:52:22
0
1
1391

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

Y.A
Y.A

reply all(1)
小猪cms@洪涛          .

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.

  • reply This is a necessary trigger for our job
    Y.A author 2018-06-21 11:28:42
  • reply If you reply, can you give me some advice?
    Y.A author 2018-06-21 11:29:14
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template