Anti-Moronic Posted February 2, 2010 Share Posted February 2, 2010 Currently, I use this: select * from table1, table2 where table1.id=table2.id That works fine, but what if I don't want to fetch tons of data from table 2, but just a single field? How do I do that? Also, can I also only select certain fields from the first table? Appreciate any help. Link to comment https://forums.phpfreaks.com/topic/190718-mysql-select-certain-fields-from-multiple-tables-in-one-query/ Share on other sites More sharing options...
Anti-Moronic Posted February 2, 2010 Author Share Posted February 2, 2010 got it. I should really have more confidence in myself.: select table1.*, table2.field1 from table1, table2 where table1.id=table2.id Hope it helps someone else looking for a quick answer. Link to comment https://forums.phpfreaks.com/topic/190718-mysql-select-certain-fields-from-multiple-tables-in-one-query/#findComment-1005773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.