I am pulling my hair out working on what would seem to be easy problem. But as a ColdFusion rookie I am just having a hell of a time figuring it out.
<cfoutput query="getSeasonAndRate">
<cfset adultRate = groupRate>
</cfoutput>
So … adultRate = 89
<cfset adultRate = 88>
So why does adultRate STILL equal 89?
Thanks! 😀
If your query contains a column named “adultRate” then your CFSET statement is updating the query object, not the variables scope.
This page (disclosure: on my own blog) discusses scope priority when reading and writing variables without explicitly specifying scope.
To fix your problem, change:
to:
(assuming the groupRate value you want to get the value from is part of the query)