%@ 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() ); } %>
We also carry Snowboards and Skateboards | |||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||