i have a database setup with multiple fields. What i am trying to do is be able to search within those fields by typing a partial or full phrase. i have accomplished this in 3 of my fields but for some reason cannot with the others. Here is my script from one of the fields:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title>ESS customer find results</title>
</head>
<body bgcolor="#182831" text="#FFFFFF" link="#FFFF00" vlink="#FFFF00" alink="#FF0000">
<STRONG>ESS users found by MAC Address</STRONG>
<CFQUERY NAME="GetMAC" DATASOURCE="customerinfo">
SELECT AccountNumber, FirstName, LastName, NodeMAC, Phone, Address, City, Zip, InstallDate, MasterID, Email
FROM essdatabase
WHERE NodeMAC LIKE '%#Form.MAC#'
</CFQUERY>
<h4>Results of MAC address Search</h4>
<CFOUTPUT query="GetMAC">
<p><table border=3>
<tr></tr> <td><b>Account:</b> #AccountNumber#</td> <td><b>Node/MAC:</b> #NodeMAC# </td> <td><b>Installed: </b></b>#InstallDate# </td>
<tr><td><b>Customer:</b> #FirstName# #LastName# </td> <td><b>Phone:</b> #Phone#</td> <td><a href="mailto:#Email#">#Email#</a> </td></tr>
<tr></tr> <td> <b>Address:</b> #Address#, #City# #Zip# </td>
</table>
</p>
</cfoutput>
</body>
The data in that field looks like this: BR05 -0090835CA577
Here is the script from another field:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title>ESS Last Name find results</title>
<style fprolloverstyle>A:hover {color: #FF0000; text-decoration: underline}
</style>
</head>
<body bgcolor="#182831" text="#FFFFFF" link="#FFFF00" vlink="#FFFF00" alink="#FF0000">
<STRONG>ESS users found by LastName</STRONG>
<CFQUERY NAME="GetLastName" DATASOURCE="customerinfo">
SELECT AccountNumber, FirstName, LastName, NodeMAC, Phone, Address, City, Zip, InstallDate, MasterID, Email
FROM essdatabase
WHERE LastName LIKE '%#Form.LastN#'
</CFQUERY>
<h4>Results of Last Name Search</h4>
<CFOUTPUT query="GetLastName">
<p><table border=3>
<tr></tr> <td><b>Account:</b> #AccountNumber#</td> <td><b>Node/MAC:</b> #NodeMAC# </td> <td><b>Installed: </b></b>#InstallDate# </td>
<tr><td><b>Customer:</b> #FirstName# #LastName# </td> <td><b>Phone:</b> #Phone#</td> <td><a href="mailto:#Email#">#Email#</a> </td></tr>
<tr></tr> <td> <b>Address:</b> #Address#, #City# #Zip# </td>
</table>
</p>
</cfoutput>
</body>
Here is data from that field: Krause
Here is the script from the last field giving me an issue:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title>ESS customer find results</title>
</head>
<body bgcolor="#182831" text="#FFFFFF" link="#FFFF00" vlink="#FFFF00" alink="#FF0000">
<STRONG>ESS users found by Street Address</STRONG>
<CFQUERY NAME="GetStreetName" DATASOURCE="customerinfo">
SELECT AccountNumber, FirstName, LastName, NodeMAC, Phone, Address, City, Zip, InstallDate, MasterID, Email
FROM essdatabase
WHERE Address LIKE '%#Form.SName#'
</CFQUERY>
<h4>Results of Street Search</h4>
<CFOUTPUT query="GetStreetName">
<p><table border=3>
<tr></tr> <td><b>Account:</b> #AccountNumber#</td> <td><b>Node/MAC:</b> #NodeMAC# </td> <td><b>Installed: </b></b>#InstallDate# </td>
<tr><td><b>Customer:</b> #FirstName# #LastName# </td> <td><b>Phone:</b> #Phone#</td> <td><a href="mailto:#Email#">#Email#</a> </td></tr>
<tr></tr> <td> <b>Address:</b> #Address#, #City# #Zip# </td>
</table>
</p>
</cfoutput>
</body>
Here is an example of data: 2316 Stonehaven Rd
I am attempting to be able to search these fields with partial or the whole phrase:
examples:
stonehaven
stone
BR05 -0090835CA577
835CA577
BR05
krause
kra
krau
Hope someone can assist me with this and thanks in advance.