Guest_imported
New member
- Jan 1, 1970
- 0
If I'm pulling in a query with a list of stats and due to certain restrictions on the way I'm pulling the data, I can't SUM it in my database, how could I go about adding them together in CF.
For example:
<cfquery name="stats">
SELECT player,
week,
team,
stat1,
stat2
FROM Stats
WHERE Team = url.team
</cfquery>
Now because stats are listed in week format I want to be able to add all the stat1 and stat2 columns where team = this team. Players may be assigned to different teams depending on the week. I tried to create a view or do this in SQL and I couldn't figure it out.. Any help would be appreciated.
Something like...
<cfoutput query=stats>
#stats.stat1.row1 + stats.stat1.row2#
</cfoutput>
I know that won't work but I think you see what I'm getting at...
For example:
<cfquery name="stats">
SELECT player,
week,
team,
stat1,
stat2
FROM Stats
WHERE Team = url.team
</cfquery>
Now because stats are listed in week format I want to be able to add all the stat1 and stat2 columns where team = this team. Players may be assigned to different teams depending on the week. I tried to create a view or do this in SQL and I couldn't figure it out.. Any help would be appreciated.
Something like...
<cfoutput query=stats>
#stats.stat1.row1 + stats.stat1.row2#
</cfoutput>
I know that won't work but I think you see what I'm getting at...