<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.goldfarm.hermei.*"%> <%@page import="com.goldfarm.db.QueryBean"%> <%@page import="java.util.*"%> <%@page import="java.text.*"%> 合美電機股份有限公司
<% QueryBean QB = new QueryBean(); QueryBean QB1 = new QueryBean(); String SQL = "SELECT c_id, c_name, c_ename FROM her_cate "; QB.setTable(SQL); %>
產品介紹 / 產品一覽表


<%for(int i = 0; i < QB.getData().length; i++){ QB1.setTable("SELECT g_id, g_name FROM her_goods WHERE c_id = '"+QB.getData()[i][0]+"'"); String gname =""; for(int j = 0; j < QB1.getData().length; j++){ if(gname.equals("")){ gname = QB1.getData()[j][1].toString(); }else{ if(j % 6 == 0 && j != 0){ gname = gname + "
" + QB1.getData()[j][1].toString(); }else{ gname = gname + " " + QB1.getData()[j][1].toString(); } } } %> <%=QB.getData()[i][1]%>
<%=QB.getData()[i][2]%> <%=gname %>
<%} %>