I have the following MySQL table.
userid - foreign key
date - primary key
slot1 - 1st free slot
slot2 - 2nd free slot
slot3 - 3rd free slot
slot4 - 4th free slot
slot5 - 5th free slot
slot6 - 6th free slot
slot7 - 7th free slot
slot8 - 8th free slot
All slots are for one day, so the user can enter different times of the day when he is free.
Now I did it, and it worked, and now I came across a problem. I entered some data for one user, and now when I try to enter data for another user for the same date, I can not, because he says that he already exists.
How can I make it possible for the same user to enter several dates and the other user to enter the same date? ... But the same user cannot enter the same date twice ... How can this to be done?
source
share