Brendan Posted June 21, 2006 Share Posted June 21, 2006 Alright say i have the following table structure:Table 1 _____________________________|----USERNAME----|----ADDDATE----|-----myname-----------2006-01-02--------myname2----------2006-01-03---- ______________________________Table 2 _____________________________________|---USERNAME---|----FIELD1----|----FIELD2----|-----myname-----------blue-----------tall--------myname2----------black----------short--- ______________________________________Now i want to have a mysql query that takes table 2, searches through it and picks out certain rows depending on the where clause that is set, and then match those rows usernames to the usernames on table 1 so that the username, adddate, field1, and field 2 are all returned in the same query.Thanks,-Brendan Link to comment https://forums.phpfreaks.com/topic/12515-mysql-query/ Share on other sites More sharing options...
realjumper Posted June 21, 2006 Share Posted June 21, 2006 Check this out...http://www.tizag.com/mysqlTutorial/mysqljoins.php Link to comment https://forums.phpfreaks.com/topic/12515-mysql-query/#findComment-47942 Share on other sites More sharing options...
Brendan Posted June 21, 2006 Author Share Posted June 21, 2006 thanks alot man, that helped alot. Link to comment https://forums.phpfreaks.com/topic/12515-mysql-query/#findComment-48238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.