Start by showing us the code your using to display the results of your
query.

On Thu, Dec 11, 2014 at 10:13 AM, Torrent Girl <[email protected]>
wrote:
>
>
> Steve now my output is off. How do I handle that?
>
> (I wish I could attach images to my posts)
>
>
>
>
> >Your task shouldn't be to handle values that were not returned from the
> >query. You need to think of a way to make sure they are returned. You
> >should be able to accomplish that by using case statements in your query.
> >Syntax may vary depending on your database, but should be something like
> >this (assume you db field is called "response"):
> >
> >Sum(case response = 'agree' then 1 else 0 end) as agree,
> >Sum(case response = 'disagree' then 1 else 0 end) as disagree,
> >Sum(case response = 'strongly agree' then 1 else 0) as strongly_agree
> >
> >And so on for each possible value. Your resultset will then contain a
> total
> >for each possible value, and a 0 if a value wasn't found at all.
> >
> >
> >
> >>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359828
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to