Richard. Why not just add a row to your table? I would add one called say
answerCount(int) and when someone submits an answer I would simply update
the columns value. Then your query would be quite easy.

Doug B.





----- Original Message ----- 
From: "Richard Cooper" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Friday, January 19, 2007 7:32 AM
Subject: Re: tallying SQL row entries


> Either way the count now seem to return the full number of results rather
than the individual tallies?
>
> i.e Doug's.
>
> | Question | Answer | Count |
> -----------------------------
> | Red Fav  |  Yes   |   7   |
> | Red Fav  |  No    |   7   |
> | Red Fav  |  Maybe |   7   |
> |like pets |  Dogs  |   7   |
>
> or Chris's grouped version:
> | Question | Answer | Count |
> -----------------------------
> | Red Fav  |  Yes   |   7   |
> |like pets |  Dogs  |   7   |
>
> Uposed to the output I need:
> | Question | Answer | Count |
> -----------------------------
> | Red Fav  |  Yes   |   3   |
> | Red Fav  |  No    |   2   |
> | Red Fav  |  Maybe |   1   |
> |like pets |  Dogs  |   1   |
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266984
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to