Merging id to multiple tables in phpmyadmin

All about creating websites!
Post Reply
User avatar
intern3t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 119
Joined: 18 Aug 2010, 02:06
13

Merging id to multiple tables in phpmyadmin

Post by intern3t »

i have a table :chapter1and2 with columns: id, agree_1, comment_1, agree_2, comment_2

and another table:chapter3 with columns: id, agree_3, comment_3, agree_4, comment_4

and another table: chapter4 with columns: id, agree_5, comment_5, agree_6, comment_6

and another table: users with columns: id , firstname, lastname, phone, ....

the idea is , when a user logs in, he or she is ment to vote. chapter1and2 is on one page, chapter 3 is on a different page, and so is chapter4.when he or she votes, her id on users table must be the same with id on the chapters. How do i join the whole tables with id to achieve this aim? thanks for reply

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Merging id to multiple tables in phpmyadmin

Post by bad_brain »

have a look at INNER JOIN:
http://www.sitepoint.com/understanding- ... -database/" onclick="window.open(this.href);return false;

:wink:
Image

Post Reply