This ended up doing it:

"XOXO" is always the last list item...


<cfquery name="features"
     datasource="#req.data#"
     username="#req.user#"
     password="#req.pass#">     
     SELECT
      id_feature,
      feature_headline,
      feature_date,
      year(feature_date) as theYEAR,
      feature_text
     FROM feature
     WHERE
     <cfloop list="#lst.srchTHS#" index="i">
       feature_headline like
        <cfqueryparam value="%#i#%" cfsqltype="CF_SQL_VARCHAR" />
       OR feature_text like
        <cfqueryparam value="%#i#%" cfsqltype="CF_SQL_VARCHAR" />
       <cfif #i# eq "XOXO"><cfelse>OR</cfif>
     </cfloop>
ORDER by feature_date DESC
</cfquery>

...unless anybody has a better idea...

lst.srchTHS won't ever be more then three to five words or so, but I 
wish I could figure a way to use cfqueryparam list="yes" instead of a 
loop...


__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 5138 (20100522) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



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

Reply via email to