I have two tables which are linked by foreign key as follows.
userdetails
-----------------------------
uid|username|password|address
-----------------------------
phonedetails
-----------------------------
pid|uid|phone1|phone2
-----------------------------
uid
is the foreign key in phonedetails
table. I want to insert userdetails
in userdetails
table and their corresponding phone numbers in phonedetails
table.
How can I do it?