Hi,
I would like to search one field in database with multiple words. Also i will allow searches for example : a or cs....(one,two characters).
My code:
<cfparam name="URL.NAME" default="1" type="Any">
<cfquery name="search" datasource="datasource">
SELECT *
FROM search
WHERE NAME LIKE ="%#URL.NAME#%"
ORDER BY DATE DESC
</cfquery>
this code works fine but only with one word or if there is exact match with multiple words.
Example:
database rows:
1.adobe photohop
2.adobe photoshop cs4
search string adobe(my code) will display both results,but
search string adobe cs4 will not display results. I want if user type one,two, three words to match any of these words and to display all results like google.
What am I doing wrong? I also tried to replace characters and add + but no results.
Any idea or example i would appreciate.