hello there..
need a small help regarding mysql databse.
i have a table k..
nw this is a table for entering information of a time table like scene..
that is a user can enter a date and then enter the times he is free for that day..
i have the following fields in the table..
ID - userid - foreign key
dates - the 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 the slots are for the same day... so the user can input different times of the day that he is free...
nw i did this and it worked and now i stumbled upon a problem.. that is i entered sum data for one user and now wen i try to enter data for another user for the same date... i cant coz it says already exists..
nw this is my problem.. how do i make it so that i can have the same user enter multiple dates and also another user enters the same date... BUT the same user cant enter the same date twice... hw can this be done??
thanks a million times in advance!!!!!!
need a small help regarding mysql databse.
i have a table k..
nw this is a table for entering information of a time table like scene..
that is a user can enter a date and then enter the times he is free for that day..
i have the following fields in the table..
ID - userid - foreign key
dates - the 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 the slots are for the same day... so the user can input different times of the day that he is free...
nw i did this and it worked and now i stumbled upon a problem.. that is i entered sum data for one user and now wen i try to enter data for another user for the same date... i cant coz it says already exists..
nw this is my problem.. how do i make it so that i can have the same user enter multiple dates and also another user enters the same date... BUT the same user cant enter the same date twice... hw can this be done??
thanks a million times in advance!!!!!!
