diablo3 Posted September 17, 2011 Share Posted September 17, 2011 I have an SQL table such as this: Pairing1Pairing2Week 611 521 431 132 542 362 and another with teams such as: teamidteamname 1Teamname 1 2Teamname 2 3Teamname 3 The numbers in the pairing are numbers of teams, which is in another SQL table. What would be the most efficient way... of displaying the information in the form of pairngs such as Week 1: Team 6 vs Team 1 Team 5 vs Team 2 etc .... What is the best way for me to sort my results? Link to comment https://forums.phpfreaks.com/topic/247317-best-way-of-processing-sql-results/ Share on other sites More sharing options...
Psycho Posted September 17, 2011 Share Posted September 17, 2011 SELECT p.Week, t1.teamname, t2.teamname FROM pairings AS p JOIN teams AS t1 ON p.Pairing1 = t1.teamid JOIN teams AS t2 ON p.Pairing2 = t2.teamid ORDER BY p.Week Link to comment https://forums.phpfreaks.com/topic/247317-best-way-of-processing-sql-results/#findComment-1270176 Share on other sites More sharing options...
diablo3 Posted September 17, 2011 Author Share Posted September 17, 2011 Thanks!! Link to comment https://forums.phpfreaks.com/topic/247317-best-way-of-processing-sql-results/#findComment-1270189 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.