|
mfalk -> RE: One submit form to search multiple fields? (4/11/2005 10:23:43)
|
Duane, that worked, and the fp_sQryhad to be =sql Here's the whole thing if anyone needs it. this was a great feature, and thanks DZ for all your hard work and Duane thanks for getting it completed. I really appreciate all the efforts. When it was UNDIETED i could sort by column using SORTCOLUMN in my hyperlink, It doesnt work now, but is there a way to make the columns stills sort? Here's the code for two drop down search. You need two search drop downs with fieldnames included as you would use for your normal search (in this example called FIELDNAME and FIELDNAME2) and two search boxes, (searchterm and searchterm2). <%
Response.Cookies("FieldName")=Replace(Request("FieldName"),"'","''")
Response.Cookies("FieldName2")=Replace(Request("FieldName2"),"'","''")
if trim(request.form("FieldName2"))="" then
sql="SELECT * FROM TABLENAME WHERE ("&Request.Cookies("FieldName")&" LIKE '::Searchterm::%')"
else
sql="SELECT * FROM TABLENAME WHERE ("&Request.Cookies("FieldName")&" LIKE '::Searchterm::%') AND ("&Request.Cookies("FieldName2")&" LIKE '::Searchterm2::%')"
end if
response.write(sql)
fp_sQry=sql
|
|
|
|