<%@ include file="/header.jsp" %> <%@ include file="/title.jsp" %>

Bulb Selection

Fluorescent
Incandescent
Compact Fluorescent
Fluorescent Retrofits
Quartz Halogen
       Mercury Vapor
High Pressure Sodium
Metal Halide
Decorative Incandescent
Other
<% PreparedStatement ps = null; ResultSet rs = null; try { String currentSuperCategory = ""; String subselect = "(select distinct bulb from base)"; String sql = "select * from bulb where bulb in " + subselect + " order by supercategory, orderby"; ps = con.prepareStatement(sql); rs = ps.executeQuery(); int i=0; while (rs.next()) { Bulb bulb = new Bulb(con, String.valueOf(rs.getInt("bulb")) ); if ( ! currentSuperCategory.equals( bulb.getSupercategory()) ) { i=0; currentSuperCategory = bulb.getSupercategory(); %> <% } i++; if( (i-1)%4==0 ){ %><% } %><% } } catch (SQLException e) { throw new RuntimeException(e.getMessage()); } finally { try { if (ps != null) ps.close(); if (rs != null) rs.close(); } catch (SQLException e) { throw new RuntimeException("Error closing ps/rs: " + e.getMessage()); } } %>

<%= currentSuperCategory %>

Back to top
<%= bulb.getDescrip() %>
<%= bulb.getImagepath() %>


Back to top

<%@ include file="/foot.jsp"%>