Delete row that has foreign key
I have 3 tables
Event
Users
Attending
The attending table has foreign keys to users and events and connects user id to event (when attending)
However some of these events need deleting and I can't do that until I manually delete entries from the attending table.
What I want is to delete entry in the events table, which would then in turn delete every entry in the attending table that matche event.id
Event
Users
Attending
The attending table has foreign keys to users and events and connects user id to event (when attending)
However some of these events need deleting and I can't do that until I manually delete entries from the attending table.
What I want is to delete entry in the events table, which would then in turn delete every entry in the attending table that matche event.id