<%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ include file="Connections/perfectwave.jsp"%> <% Connection connection = null; Statement categoryStatement = null; Statement productStatement = null; Statement itemStatement = null; ResultSet categoryRS = null; ResultSet productRS = null; ResultSet itemRS = null; String queryType = null; String queryCategory = null; String queryItem = null; String category = null; try { queryType = request.getParameter("type"); queryCategory = request.getParameter("category"); queryItem = request.getParameter("item"); Class.forName(MM_perfectwave_DRIVER).newInstance(); connection = DriverManager.getConnection(MM_perfectwave_STRING, MM_perfectwave_USERNAME, MM_perfectwave_PASSWORD); categoryStatement = connection.createStatement(); productStatement = connection.createStatement(); itemStatement = connection.createStatement(); categoryRS = categoryStatement.executeQuery("SELECT category FROM products WHERE type='" + queryType + "' GROUP BY category"); productRS = productStatement.executeQuery("SELECT * FROM products WHERE type='" + queryType + "' AND category='" + queryCategory + "' ORDER BY name ASC"); itemRS = itemStatement.executeQuery("SELECT * FROM products WHERE name='" + queryItem + "'"); } catch (Exception e) { out.println( e.toString() ); } %> PerfectWave surfshop | NW Surf Boards, Pics, Bikinis
We also carry Snowboards and Skateboards
return to PerfectWave home page
<% try { while (categoryRS.next()) { category = categoryRS.getString("category"); %> <% if ( category.equals(queryCategory) ) { %> <% } } categoryRS.beforeFirst(); productRS.beforeFirst(); } catch (Exception e) { out.println( e.toString() ); } %>

<%=category%>
<% while (productRS.next()) { %> <% } %>
"> <%=productRS.getString("name")%>


<% if (queryItem == null) { %> <% while( productRS.next() ) { %> <% } } else { itemRS.next(); %>
<%=queryCategory%>

"> <% if (!productRS.getString("thumbphoto").equals("")) { %> " border=0 alt="[view item]" width="71" height="80"> <% } else { %> [view item] <% } %>
<%=productRS.getString("name")%> <%=productRS.getString("description")%>
<%=productRS.getString("md01")%>
<%=productRS.getString("sd01")%>
<%=productRS.getString("price")%>*
">[view item]


<%=itemRS.getString("name")%>
<% if (!itemRS.getString("frontphoto").equals("")) { %> " name="full_item"> <% } else { %> [view item] <% } %>





<%=itemRS.getString("maker")%>

<%=itemRS.getString("description")%>

<%=itemRS.getString("md01")%>

<%=itemRS.getString("md02")%>

<%=itemRS.getString("md03")%>

<%=itemRS.getString("inventory")%>

<%=itemRS.getString("price")%>*

<%=itemRS.getString("comment")%>

<% if (!itemRS.getString("user01").equals("")) { String strArray[] = itemRS.getString("user01").split(","); %>     <% } if (!itemRS.getString("user02").equals("")) { String strArray[] = itemRS.getString("user02").split(","); %> <% } %> "> ">

<% if (!itemRS.getString("backphoto").equals("")) { %> <% } %>
<%=itemRS.getString("sd01")%>
<%=itemRS.getString("sd02")%>
<%=itemRS.getString("sd03")%>
<%=itemRS.getString("sd04")%>
<%=itemRS.getString("sd05")%>
<% } %>
<% String strParam = request.getParameter("type"); if((strParam!=null)&&(strParam.equals("surfboard"))) { out.println("*Packing and shipping cost not included on price of board. Call shop (425-827-5323) to get details."); } %>