Yet another "driving me crazy" query problem.

I'm showing a grid of color blocks. When the user clicks on one of them, 
it set a variable to look for in the database:

<cfset colorLIST = "'Teal', 'Turquoise', 'Mediterranean',  'Blue-Green', 
'blue-green'">


So, here's the query

<cfquery name="srch" datasource="phoenixart">
  SELECT * FROM products
  WHERE COLOR IN (#PreserveSingleQuotes(colorLIST)#)
</cfquery>

But, here's the problem.
Database "Color" Field values for product 1:  blue-green, purple, gold
Database "Color" Field values for product 2:  blue-green


Only product 2 comes up, because the search wants to have an exact match 
to the entire field, right? So, how do I get "like" match from the list?




-- 
-----------
Les Mizzell

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202222
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to