I have many to many relationship between user and days. A day can have many users, a user can have many gifts. Is there any way to make this day_id unique with the users?
Example of table shown below:
**user_id day_id**
1 1
1 1 cannot get prize in day 1 if he already got one
2 1
3 1
1 2
2 2
2 2 {not again user_id 2 can get day_id 2 gift}