<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim rsRetail__MMColParam rsRetail__MMColParam = "QWERTYQWERTY" If (Request.QueryString("bizName") <> "") Then rsRetail__MMColParam = Request.QueryString("bizName") End If %> <% Dim rsRetail Dim rsRetail_numRows Set rsRetail = Server.CreateObject("ADODB.Recordset") rsRetail.ActiveConnection = MM_connSpringGarden_STRING ' This is where I set the SQL to display all records if nothing is typed in search. If rsRetail__MMColParam = "QWERTYQWERTY" Then ' By all categories If Request.QueryString("category") = "all" Then rsRetail.Source = "SELECT Name, Address, City, Postal, Phone, Fax, Location, Email, Website, Category FROM retail ORDER BY Name ASC" ' By specific category Else rsRetail.Source = "SELECT Name, Address, City, Postal, Phone, Fax, Location, Email, Website, Category FROM retail WHERE Category LIKE '%" + Replace(Request.QueryString("category"), "'", "''") + "%' ORDER BY Name ASC" End If ' This will filter the search based on what was typed in. Else ' and all categories If Request.QueryString("category") = "all" Then rsRetail.Source = "SELECT Name, Address, City, Postal, Phone, Fax, Location, Email, Website, Category FROM retail WHERE Name LIKE '%" + Replace(rsRetail__MMColParam, "'", "''") + "%' ORDER BY Name ASC" ' and specific category Else rsRetail.Source = "SELECT Name, Address, City, Postal, Phone, Fax, Location, Email, Website, Category FROM retail WHERE Name LIKE '%" + Replace(rsRetail__MMColParam, "'", "''") + "%' AND Category LIKE '%" + Replace(Request.QueryString("category"), "'", "''") + "%' ORDER BY Name ASC" End If End If rsRetail.CursorType = 0 rsRetail.CursorLocation = 2 rsRetail.LockType = 1 rsRetail.Open() rsRetail_numRows = 0 %> Spring Garden --- Search Results

Search Results

The search produced these findings:


<% Dim CurRec CurRec = 1 While Not rsRetail.EOF %> <%=CurRec%>. &category=&Submit=Search%21"><%=(rsRetail.Fields.Item("Name").Value)%>
Category: <% If rsRetail.Fields.Item("Category").Value = "apparel" Then %> Apparel <% Else If rsRetail.Fields.Item("Category").Value = "books" Then %> Books/Magazines <% Else If rsRetail.Fields.Item("Category").Value = "electronics" Then %> Electronics <% Else If rsRetail.Fields.Item("Category").Value = "floral" Then %> Floral <% Else If rsRetail.Fields.Item("Category").Value = "food" Then %> Food & Drink <% Else If rsRetail.Fields.Item("Category").Value = "gifts" Then %> Gifts & Collectibles <% Else If rsRetail.Fields.Item("Category").Value = "health" Then %> Health & Beauty <% Else If rsRetail.Fields.Item("Category").Value = "home" Then %> Home Décor <% Else If rsRetail.Fields.Item("Category").Value = "jewelery" Then %> Jewelery <% Else If rsRetail.Fields.Item("Category").Value = "music" Then %> Music <% Else If rsRetail.Fields.Item("Category").Value = "optical" Then %> Optical <% Else If rsRetail.Fields.Item("Category").Value = "pharmacy" Then %> Pharmacy/Drug Stores <% Else If rsRetail.Fields.Item("Category").Value = "photo" Then %> Photography/Equipment <% Else If rsRetail.Fields.Item("Category").Value = "shoes" Then %> Shoes/Shoe Repair <% Else If rsRetail.Fields.Item("Category").Value = "sports" Then %> Sporting Goods/Recreation <% Else If rsRetail.Fields.Item("Category").Value = "travel" Then %> Travel <% Else If rsRetail.Fields.Item("Category").Value = "other" Then %> Other <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %> <% End If %>
<% CurRec = CurRec + 1 %> <% rsRetail.MoveNext Wend %>

Home

|

Where

|

Events

|

Shopping

|

Parking

|

Lodging

|

Photos

|

Contact Us

|

About Us

<% rsRetail.Close() Set rsRetail = Nothing %>