I'm having trouble figuring out how to use a SQL select statement to get
data for multiple records from multiple tables and then do some math on each
of the individual records for <cfoutput>.

I have a db with results from an annual golf event. There are 3 tables
containing the data I need: tblOne with results from day one; tblTwo with
results from day two; tblThree with demographic info (name, club, handicap,
etc.). Here is a simplified version of what I need to do:

1.
SELECT from tblThree to get demographic info
SELECT from tblOne getting points scored by each golfer on day one
SELECT from tblTwo getting points scored by each golfer on day two

2.
For each golfer, do some math using data from the above SELECTs, for example
(dayOne pts + dayTwo pts)

3.
<CFOUTPUT> the results for each golfer </cfoutput>

I can run all this through just fine if I feed a player name to the
template. But I need to compile an overall chart that contains the data for
every golfer. What I'm struggling with is how to take each golfer's data
sequentially and do the math on it. I've tried using <CFLOOP> to loop over
the <CFQUERY> results for each golfer, but I haven't figured the magic
formula yet.

I am probably overlooking something simple - not seeing the forest through
the trees. Any help would be great.

Paul Sinclair





------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to