I have two tables, user and event. A user can join an event, but only one. Every event has its own capacity.
For example:
The event #1 has a 20 persons limit. The event #2 has a 13 persons limit.
I have an "event" column in user table which stores the Id of the event. On the other hand, I have a "limit" column in event table.
What is the best way to achieve this?
I am using phpmyadmin by the way.