Search multiple words in SQL
I want to be able to search on multiple words in sql. If someone inputs into the search field multiple words like 'biofuels corn industry' . I want to return all records that has any of those words in them. Below is my code:(which only brings back the phrase and not individual words from the database)
and (
path like <cfqueryparam cfsqltype="cf_sql_varchar" value="%#arguments.searchterms#%">
or
body like <cfqueryparam cfsqltype="cf_sql_longvarchar" value="%#arguments.searchterms#%">
or
summary like <cfqueryparam cfsqltype="cf_sql_varchar" value="%#arguments.searchterms#%">
or
author like <cfqueryparam cfsqltype="cf_sql_varchar" value="%#arguments.searchterms#%">
)
