This is driving me batty. Every time I try to run this code I get a QoQ syntax 
error and I'm not seeing where the error is.

<cfloop from="1" to="3" index="i">
<cfquery name="section" dbtype="query">
SELECT *
FROM questions
WHERE section = #i#
</cfquery>
</cfloop>

In case it's not immediately obvious, section is an int with possible values 
ranging 1-3. I've double checked that it actually is in the questions query. 
Other variations I've tried are:
WHERE section = '#i#'
WHERE section = 1
WHERE section = '1'
WHERE section = 'WHY WON'T YOU WORK!!!' (ok, so I didn't try that one).

It seems no matter what I put in the where statement it throws a QoQ error. If 
I leave the where statement off completely it works fine, but that's pretty 
useless in this situation. What am I doing wrong? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333262
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to