I tried the second solution, but its not returning any data.... How to implement the first solution dynamically, i mean i don't know how many key words end user will enter...
Thanks Raj > <cfset keyword1 = "test"> > <cfset keyword2 = "test"> > and (prds.title like <cfqueryparam cfsqltype="cf_sql_varchar" > list="true" value="%#keyword1#%"> OR > prds.title like <cfqueryparam cfsqltype="cf_sql_varchar" list="true" > value="%#keyword2#%">) > or maybe > and prds.title IN <cfqueryparam cfsqltype="cf_sql_varchar" list="true" > value="%#keyword#%"> > don't forget the "%" so the keyword can be anywhere in the title > ----- Original Message ---- > From: ch g <[EMAIL PROTECTED]> > To: CF-Talk <[email protected]> > Sent: Wednesday, August 1, 2007 9:14:53 AM > Subject: Cfqueryparam and list > what's wrong with this code.... > <cfset keyword = "test,test1"> > <cfquery name='getdata' datasource='abcde'> > SELECT * from prds > WHERE 1 = 1 > and prds.title like <cfqueryparam cfsqltype="cf_sql_varchar" > list="true" value="#keyword#"> > </cfquery> > I am trying to get data from database with those two key words, if any > title has the keyword test or test1 pull that data, i don't know what > i am missing... > Thanks > Raj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285068 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

