I have 2 tables – one storing user information (id, username, password) and the second one storing information about events (id, name, description, date, username(represents the user who created the event)). I would like to implement ‘favourite events’ functionality. This would allow the user to store his favourite events and later display them in a list. I am not sure how to implement this in terms of design. I need a simple solution. Something like storing the IDs of favourite events in a field in the user table. I am using mysql and PHP. Can anyone point me to the right direction?
Share
You want to have a table linking the foreign keys from the user and event tables.
Users Table:
Events Table:
Favorites Table:
This way you can easily access the list of favorite events.