The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
Need help with a query/result
Ok here are my 2 tables being used:
fc_team and fc_player I need to display the player name of each field in team [which are just ids] (ie fc_team.batsmanid1=fc_player.id) I tried using left join but since there would be a different 'name' field for each id it won't work. I got the query working using [sql] SELECT team.batsmanid1, player1.name, team.batsmanid2, player2.name FROM fc_team team, fc_player player1, fc_player player2 WHERE team.batsmanid1=player1.id AND team.batsmanid2=player2.id AND team.id=$teamid [/sql] Upon showing this (I just used 2 of the positions for testing), I could only get one name to display, so how would I go about doing this? Can you rename the result to something like name2 instead of having 4 names, which causes conflicts? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|