I have what I had initially thought was a relatively easy request, however it hasn't quite proved that way, at least not just yet. With any luck I'm missing something simple.
A working example is easiest to start with:
<cfoutput query="results">
<tr bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'), DE('cccccc'))#">
<td>#team_name#</td>
<td>#round1#</td>
<td>#total_score#</td>
</tr>
</cfoutput>
>From a previous query (results) I want to output in a table the results for each of the columns listed above; team_name, round1, and total_score - but I don't want to have to hard code round1, since that will depend on the round number. This is already set as another variable (called round_number). I guess what I'm saying is that I don't want to hard code "round1" because sometimes it might be "round2", or "round7", so I need a way of retrieving the info from the column round1, for instance.
However, when I try the following:
<cfoutput query="results">
<tr bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'), DE('cccccc'))#">
<td>#team_name#</td>
<td>#round("#round_number#")#</td>
<td>#total_score#</td>
</tr>
</cfoutput>
or
<cfoutput query="results">
<tr bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'), DE('cccccc'))#">
<td>#team_name#</td>
<td>#round(round_number)#</td>
<td>#total_score#</td>
</tr>
</cfoutput>
it outputs 1 repeatedly (which is the current round_number) in the middle column. As I have outlined, this is not what I want. What I want are all values from the column titled round1.
Another way to put it is like so:
lets assume I have a table in my database with 4 fields - team_name, round1, round2, round3 and total_score. The current round number is 1 (for arguments sake, and this variable is already defined as round_number) and I would like to output for each team their score for the current round (round1) and their total score.
Does that make sense?
All help greatly appreciated.
Regards
Mark Henderson
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

