<% Set objconn = Server.CreateObject("ADODB.Connection") DBPath=Server.MapPath("/database/_database.mdb") objconn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DBPath %> <% if request("category_name")="" then MMM=" order by ProductID" else MMM=" WHERE Category='" & request("category_name") & "' ORDER BY ProductID" end if SQL_AK="SELECT * FROM Products" &MMM Set rs_ak = Server.CreateObject("ADODB.Recordset") rs_ak.Open SQL_AK, objconn,3 %>
Сортирај по производител:
<% if not rs_ak.eof then Do until RS_AK.EOF %>
">.jpg">  
<%=rs_ak.fields("Product")%> - <%=rs_ak.fields("Manufacturer")%>
<%=rs_ak.fields("Overview Short")%>  
 
 
<% rs_ak.MoveNext if not RS_AK.EOF Then %>
">.jpg">  
<%=rs_ak.fields("Product")%> - <%=rs_ak.fields("Manufacturer")%>
<%=rs_ak.fields("Overview Short")%>  
 
 
<% else %> <% end if %> <% if not rs_ak.EOF Then rs_ak.MoveNext end if loop %> <% else %> <% end if %>