<%@ LANGUAGE=VBScript %> <% Response.Buffer = True %> Search Result Industrial Catalogue <% IF Session("Common_Access") < 1 THEN 'msgbox "Invalid User Name OR Password",48,"Warning" Response.Clear 'error logon warning Response.Redirect "unlogon.asp" END IF %>

 

 

<%= FormatDateTime (date, vbLongDate) %>

<% DIM prodTemp, compTemp, cateTemp, cat_v cat_v = "" IF Request.Form("lc_product") = "" Then prodTemp = "%" Else prodTemp = Request.Form("lc_product") End IF IF Request.Form("lc_company") = "" Then compTemp = "%" Else compTemp = Request.Form("lc_company") End IF IF Request.Form("lc_catalog") = "All" Then cateTemp = "%" Else cateTemp = Request.Form("lc_catalog") End IF Set IndustryNetSQL = Server.CreateObject("ADODB.Connection") IndustryNetSQL.ConnectionTimeout = Session("IndustryNetSQL_ConnectionTimeout") IndustryNetSQL.CommandTimeout = Session("IndustryNetSQL_CommandTimeout") IndustryNetSQL.Open "thaiindustry", "tinhosting", "tinhosting" sql = "SELECT productName, name, brandname, productdescription, specification, packing, categories.category " & _ " FROM Products, Categories, Company " & _ " WHERE products.companyid = company.companyid AND" & _ " Company.catid = categories.catid AND " & _ " Products.productName LIKE '" & prodTemp & "%' AND" & _ " Categories.category LIKE '" & cateTemp & "%' AND" & _ " name LIKE '" & compTemp & "%'" & _ " ORDER BY categories.category ASC, productName ASC" Set RS = IndustryNetSQL.Execute(sql) %>
<% Do WHILE not RS.eof %> <%IF RS("category") <> cat_v THEN%> <%cat_v = RS("category")%> <%END IF%> <%RS.MoveNext%> <%IF RS("category") <> cat_v THEN%> <%cat_v = RS("category")%> <%END IF%> <% RS.MoveNext%> <%Loop%>
Product Name Brand Name Company Name
<% =RS("category")%>
"><% =RS("productName")%> <% =RS("Brandname")%> <% =RS("name") %>
<% =RS("category")%>
"><% =RS("productName")%> <% =RS("Brandname")%> <% =RS("name") %>

<% RS.close IndustryNetSQL.close %>