php - How can I add multiple addresses of single user in MySQL database -


i need help. want have 2 tables in database. 1 user n othetis address. want add multiple addresses user added in user table. how can ? thank you.

you have 2 different tables:

1) user

2) address

give foreign key id of user table address table

example:

user

id    name    email 1     abc     xxx@xxx.com 

address

id    user_id      address detail 1      1          address detail 1 2      1          address detail 2 

here user 1 has 2 address. can add more address also


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -