I've tried pluging in the code you supplied, to use the shopsearch.asp, but still does not work. And what's even weireder is, if I go to the shopsearch.asp page directly and put in a word for an exact match, I get the same results. So, I don't think the problem is with the code itself. Is there a setting in the administration back-end that would affect searches? Because I haven't touched any of that code. So, I'm a little perplexed at why this will not work.
Here is the code I currently have:
Sub CatSubSchool
dim dbc, rs, sql
shopopendatabaseP dbc
%>
<form name='catnavForm'>
<select name="menu" onChange = "self.location = document.catnavForm.menu[document.catnavForm.menu.selectedIndex].value;" style="color: #000000; font-size: 8 pt; font-family: Verdana; font-weight: normal;" >
<option>Select School</option>
<%
sql="SELECT distinct pother1 from products where pother3='College'"
set rs=dbc.execute(sql)
Do While Not rs.EOF
%>
<OPTION style="width: 100px;" VALUE="shopsearch.asp?search=yes&exact=<%=trim(rs("pother1"))%>"><%= rs("pother1") %></option>
<%
rs.MoveNext
Loop
response.write "</SELECT></form>"
Closerecordset rs
shopclosedatabase dbc
end sub
Edit: I was digging through some other posts, and in one someone from support said, if you edit the code starting at line 734 in the shoproductscreatesql.asp file, that you could get an exact match. Here is that code:
if exactString <> "" then
SQL = SQL & whereok
SQL = SQL & "("
Whereok=""
exactString=cleanchars(exactString)
For j=0 to fieldcount
If j> 0 then
SQL = SQL & " OR "
else
'SQL=SQL & " ( "
end if
SQL = SQL & "p." & searchfields(j) & " LIKE '%" & exactString & "%' "
next
SQL = SQL & ")"
whereok=" AND "
end if
However, when I tried to change it I get no results. I always thought that if you used a LIKE statement it would act just like the results I'm currently getting. I.e. It will return anything containing that exactstring. Could someone please help me?