I am trying to delete records from two different tables at one time.
In event I have eventid and eventname
in participants I have eventid and name
Table associates who will be attending events in table 1. So eventid = eventid in table 1 for how many people are attending.
What would be the delete syntax for Mysql, if I want to delete from table event eventid=1 and all those associated in the participants table where eventid=1
I know that these work:
DELETE FROM participants WHERE eventid=1
DELETE FROM event WHERE eventid=1
How can i combine the two?
In event I have eventid and eventname
in participants I have eventid and name
Table associates who will be attending events in table 1. So eventid = eventid in table 1 for how many people are attending.
What would be the delete syntax for Mysql, if I want to delete from table event eventid=1 and all those associated in the participants table where eventid=1
I know that these work:
DELETE FROM participants WHERE eventid=1
DELETE FROM event WHERE eventid=1
How can i combine the two?