I'm using coldfusion to search and display data from an Oracle DB.
I've included the code snippet for my search form, its a basic text input search facility and it works pretty well for what I need.
Some of the fields in my Tables are upper case, and some are lower case and my search form is using a case sensitive approach to finding the data.
Is there a way to turn off case sensitivity?
I also need to display an error if the search returns no results.
thanks in advance.
<cfparam name="FORM.search_field" default="">
<cfquery name="Qsearch" datasource="wprop">
WHERE FIRST_NAME LIKE '%#FORM.search_field#%' OR LAST_NAME LIKE '%#FORM.search_field#%' OR JOB_TITLE LIKE '%#FORM.search_field#%' OR DEPARTMENT LIKE '%#FORM.search_field#%'
ORDER BY LAST_NAME
<!-- db search form -->
<cfform method="post" action="index.cfm">
<cfinput type="text" name="search_field" required="yes" message="Please enter a search" size="40">
<input name="action" id="action" type="submit">
<cfif isDefined("action") is "true">
<cfif trim(FORM.search_field) is "">
<cfoutput>Please enter a search query</cfoutput>
<div><p>#Qsearch.LAST_NAME#, #Qsearch.FIRST_NAME#<br />