Question
Help with query
I have the following record in my database:
Field = Name
Value = a test
When i run the following query using a form variable that is "atest" I don't get any results, but if i use a form variable that is "a test" then it works fine. What can i do in order to get that record when i input the search term "atest".
<cfquery name="test" datasource="#DSN#">
SELECT *
FROM tbl_main
where Name LIKE '%#form.name#%'
</cfquery>
Field = Name
Value = a test
When i run the following query using a form variable that is "atest" I don't get any results, but if i use a form variable that is "a test" then it works fine. What can i do in order to get that record when i input the search term "atest".
<cfquery name="test" datasource="#DSN#">
SELECT *
FROM tbl_main
where Name LIKE '%#form.name#%'
</cfquery>
