I have the following table
search_redirect
sr_id | sr_keyword | sr_redirect | sr_synonyms
------------------------------------------------------
1 | chair | www.url.com | recliner,seat,stool
2 | couch | www.url.com | sofa,divan
3 | dresser | www.url.com | chest,drawers
When someone uses the search feature on my site, I want to be able to compare what they search to the list of synonyms. My attempt at a solution was this:
SELECT sr_redirect
FROM search_redirect
WHERE '#url.q#' IN (sr_redirect)
Unfortunately, while this is a completely legal move, it doesn't do what I thought it would do. My next attempt was to try and add single quotes to my values in the sr_synonyms
, but that also did not yield successful results. Its difficult to word this issue so I was unable to find any help on this situation. Any advise I can get on this would be most appreciated. I am using ColdFusion 9 server-side scripting with SQL Server 2008.