ardhix Posted April 2, 2013 Share Posted April 2, 2013 please help i have assignment to selecting tables by joining them.. how do i use join, or inner join? is there another option selecting 3 tables by using foreign key? Here's the table this one is user table here is article category and this is content of article i was willing to choosing article_news table = article_id, category_article_id, user_type_id, user_id, judul(title), artikel, photo, tag, tanggal tcategory_article = category_article_id, category_article tuser = user_type_id, firstname, lastname thank you Link to comment https://forums.phpfreaks.com/topic/276408-joining-3-tables-mysql/ Share on other sites More sharing options...
lilmer Posted April 2, 2013 Share Posted April 2, 2013 SELECT * FROM user_table as u JOIN content_article as a ON u.user_id = a.user_id JOIN article_category as c ON a.category_article_id=c.category_article_id WHERE . . . . Link to comment https://forums.phpfreaks.com/topic/276408-joining-3-tables-mysql/#findComment-1422429 Share on other sites More sharing options...
ardhix Posted April 3, 2013 Author Share Posted April 3, 2013 SELECT * FROM user_table as u JOIN content_article as a ON u.user_id = a.user_id JOIN article_category as c ON a.category_article_id=c.category_article_id WHERE . . . . it works somehow, thank you Link to comment https://forums.phpfreaks.com/topic/276408-joining-3-tables-mysql/#findComment-1422638 Share on other sites More sharing options...
lilmer Posted April 6, 2013 Share Posted April 6, 2013 No problem Link to comment https://forums.phpfreaks.com/topic/276408-joining-3-tables-mysql/#findComment-1423248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.