Question
3 Q-of-Q's into a loop??
I was thinking it would be easier to write out something
like:
<cfset startpoint=1>
<cfloop list="1,0,-1" index="i" delimiters=",">
<cfquery name="itemCount" dbtype="query">
select count(*) as rCount
from ReviewDisplay
where Rev_Overall='#i#'
</cfquery>
<cfset c_count#startpoint#=#itemCount.rCount#>
<cfset startpoint=startpoint+1>
</cfloop>
But it fails on either:
<cfset c_count#startpoint#=#itemCount.rCount#>
or
will say:
Comparison exception while executing =.
Unsupported Type Comparison Exception: The = operator does not support
comparison between the following types:
Left hand side expression type = "INTEGER".
Right hand side expression type = "STRING".
Or I get a empty string back.......
Why??
<cfset startpoint=1>
<cfloop list="1,0,-1" index="i" delimiters=",">
<cfquery name="itemCount" dbtype="query">
select count(*) as rCount
from ReviewDisplay
where Rev_Overall='#i#'
</cfquery>
<cfset c_count#startpoint#=#itemCount.rCount#>
<cfset startpoint=startpoint+1>
</cfloop>
But it fails on either:
<cfset c_count#startpoint#=#itemCount.rCount#>
or
will say:
Comparison exception while executing =.
Unsupported Type Comparison Exception: The = operator does not support
comparison between the following types:
Left hand side expression type = "INTEGER".
Right hand side expression type = "STRING".
Or I get a empty string back.......
Why??
