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
| userid | username | password | |
| 1 | sindhu | ...... | [email protected].. |
| 2 | sama | .... | [email protected] |
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.

Piyush PansuriyaRank #454 · 5.5K reputationPosted Feb 26, 2018, 9:50 PM EST
Sindhu Kavuri64 reputationPosted Feb 26, 2018, 10:18 PM EST