Take your query and wrap it in a cfoutput tag instead of cfquery. Remove the cfqueryparams and just have the variables. This should output exactly what is being passed to your DB. Can you post this query or maybe you'd even see what's wrong. Plus if you run that query against your DB it should generate the same error.
On Wed, May 4, 2011 at 8:04 PM, Les Mizzell <lesm...@bellsouth.net> wrote: > > On 5/4/2011 8:15 PM, Greg Morphis wrote: >> >> the double quotes? >> like '%bob%' or '%ted%' > > That's just in the outputted version. > > I've rewritten it again though. Output is now: > > WHERE section <> 'news' > AND ( headline LIKE '%barnett%' > OR content LIKE '%barnett%' OR headline LIKE '%shale%' > OR content LIKE '%shale%' ) > > > SELECT > id_page, > headline, > content, > section > FROM pages > WHERE section <> 'news' > <cfif ListLen('#myLIST#') gt 1> > AND ( > <cfloop list="#mylist#" index="i"> > <cfset #thisROW# = #thisROW# + 1 /> > headline LIKE <cfqueryparam value="%#i#%" > cfsqltype="cf_sql_varchar"> > or content LIKE <cfqueryparam value="%#i#%" > cfsqltype="cf_sql_varchar"> > <cfif #thisROW# LT #listCOUNT#> OR </cfif> > </cfloop> ) > <cfelse> > AND ( headline LIKE <cfqueryparam value="%#req.cleanerINPUT#%" > cfsqltype="cf_sql_varchar"> > or content LIKE <cfqueryparam value="%#req.cleanerINPUT#%" > cfsqltype="cf_sql_varchar"> ) > </cfif> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:344243 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm