my doubt is i want to insert userid and checkbox values based on userselection then i also want to insert username from anoter table based on the similarity of the userid
for example my table users
it has userid ,username passwd, email.. here userdid is PK
second tblee mood --
here i will take userid and mood from the user after his selection
so, now after his selction of userid , i want to insert the username which is related to the selected userid ..
like the below table
userid | mood | username |
1 | happy | sindhu |
i think i have to make userid in mood table as FK and then how can i get username
i am getting confused..Any Help is Appreciated .
Thanks in Advance.