posted 5 years ago
In a simple servlet program I am creating profiles for different persons registering with the application.The related "registration" table has a "USERID" column where the users' unique "USERID" will be stored. Now I have another table named "MEAL" which has the same column "USERID" which is primary key to "registration" table. When an user will select a meal to be taken from meal selection page corresponding meal data are saved to "MEAL" table.Now I wish the corresponding USERID to be automatically stored in the "USERID" column of the "MEAL" table. So how can I achieve this functionality?Please help me on this!!