todayme Posted March 13, 2007 Share Posted March 13, 2007 What I am hoping to do is something like this. Select from BTable where Tablefield = ATable Tablefield. Basically its a one to many relationship and I want to pick the many records that match up with the one from the first table field Link to comment https://forums.phpfreaks.com/topic/42440-mysql-qery-across-two-tables/ Share on other sites More sharing options...
chronister Posted March 13, 2007 Share Posted March 13, 2007 Look into joins It is exactly what you are looking for http://dev.mysql.com/doc/refman/5.0/en/join.html http://www.keithjbrown.co.uk/vworks/mysql/mysql_p5.php Link to comment https://forums.phpfreaks.com/topic/42440-mysql-qery-across-two-tables/#findComment-205936 Share on other sites More sharing options...
artacus Posted March 13, 2007 Share Posted March 13, 2007 It's called a JOIN SELECT * FROM tableA AS a JOIN tableB AS b ON a.id = b.tabA_id WHERE whatever Link to comment https://forums.phpfreaks.com/topic/42440-mysql-qery-across-two-tables/#findComment-205938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.