Thanks for the response, Phillip.
I have combined the ratings into the judges table to only have two tables
instead of three. I am not able to get the average rating, or score, after
doing this.
<!---Get poems--->
<cfquery name="qGetPoems" datasource="myDSN">
SELECT id, poemTitle FROM Poems order by id asc
</cfquery>
<table>
<tr>
<th>ID</th>
<th>Title</th>
<th>Rating</th>
<th>Judge(s)</th>
</tr>
<cfoutput query="qGetPoems">
<tr>
<td>#id#</td>
<td>#poemTitle#</td>
<!---Get Score--->
<cfquery name="qGetRating" datasource="myDSN">
SELECT AVG(rating) as TotalScore
FROM Judges
WHERE PoemID = #currentRow.PoemID#
</cfquery>
<td>#qGetRating.TotalScore#</td>
<td>Judge 1</td>
</tr>
</table>
I'm not certain how to get the specific average score for the proper poem in
each row. I thought the currentRow function would help, but it seems to error
any way I use it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5199
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm