Help with SQL Query for search app.


I am trying to finish off my search application but not having much luck, it did all work until I realized I couldn't enter the ' sign into search phrases, so I had to find a workaround.

I need the search app to search on the following:

So far I have got:
...CONTAINS(description, <cfqueryparam cfsqltype=cf_sql_varchar value=' "#searchText#" '>))

which does the "EXACT PHRASE" search, but I can't seem to manage the other 2 using the CFQUERYPARAM. The reason why I am using the CFQUERYPARAM is beacuse I could not get it to search something like (term's) as it had the ' sign in it, and using the CFQUERYPARAM seems to work fine.

So if anyone has any ideas on how to do:
ALL WORDS (ALL words which user enters must be present within the "description" field, but can be in any order)
ANY WORDS (ANY words which user enters can be present within the "description" field, but can be in any order)

Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

take a look at customtag booleansearch tag

it does everything u need !

send me ur email address & i'll email it to u [as i dont remember where i got it from]


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
marhk51Author Commented:
I have send you email to your HM address.

send it to - i cannot access HM right now !
marhk51Author Commented:
Cheers mate, I got it to work the way I like.

Thanx alot.
My Pleasure :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.