PHPro Posted August 30, 2009 Share Posted August 30, 2009 for example i have 2 different tables first one contains (id, username, posts) and the second one contains (id, age, whatever)... I want them to be related. like, i want an output in one table displaying every variables inside both of the table. Link to comment https://forums.phpfreaks.com/topic/172467-solved-relational-database-question/ Share on other sites More sharing options...
kickstart Posted August 31, 2009 Share Posted August 31, 2009 Hi You need a JOIN, to join the 2 sets together based on a common field. Something like:- SELECT a.id, username, posts, age, whatever FROM table1 a INNER JOIN table2 b ON a.id = b.id All the best Keith Link to comment https://forums.phpfreaks.com/topic/172467-solved-relational-database-question/#findComment-909637 Share on other sites More sharing options...
PHPro Posted September 5, 2009 Author Share Posted September 5, 2009 Thank you so much. Very helpful Link to comment https://forums.phpfreaks.com/topic/172467-solved-relational-database-question/#findComment-913188 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.