Try QuotedValueList

<cfquery name="getResults" datasource="expertise">
     SELECT * FROM projects
    WHERE category IN
(#PreserveSingleQuotes(QuotedValueList(FORM.SelectExpertise))#)
</cfquery>

Not sure if you need the PreserveSingleQuotes or not. If this gives you a
problem try without

Duane



-----------------------------------
Discuss your favorite NHL, NFL, NBA,
MLB and CFL teams at SportNutz.com:
http://www.sportnutz.com

-----Original Message-----
From: Michael Blair [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 13, 2000 11:05 PM
To: [EMAIL PROTECTED]
Subject: searching a database list


Need some help on this one.  I have a select field ("expertise") that
folks can select multiple items from and then upon submittance are
submitted into the databaseThen there is a search form to search on these
database fields
This is my search:

<cfquery name="getResults" datasource="expertise">
     SELECT * FROM projects
    WHERE category IN (#PreserveSingleQuotes(FORM.SelectExpertise)#)
</cfquery>

This does not find an entry within the database such as ('internet', 'html',
'coldfusion')

I give the option for the users to select numerous options but unless
they select the exact same expertise entered into the database it
returns nothing.  If they are an expert in internet and that is within
their list I want that returned.  Is there a way to do this if the
database already has these fields are do you have to enter them each
individually into their own row?



----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to