<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="errorPage.html" %> <%@ page import="java.util.*" %> <%@ page import="data.*" %> CAD CG <% Conn conn=new Conn(); String sql = "select * from alumni where alu_title=1 "; ResultSet rs1=null; ResultSet rs2=null; int i=0; int j=0; String mem_name=null; %>

毕业校友

 

博士生:


<% i=0; // sql= "select * from member where mem_title=1 "; rs1=conn.executeQuery(sql); while(rs1.next()){ mem_name=rs1.getString("alu_name"); j=mem_name.length(); %> <%=mem_name %> <% i=i+1; if (i==12) { out.println("
"); i=0; } else if(j==2) out.println("    "); else if(j==3) out.println("  "); } %>

 

硕士生:


<% i=0; rs1.close(); sql= "select * from alumni where alu_title=2 "; rs2=conn.executeQuery(sql); while(rs2.next()){ mem_name=rs2.getString("alu_name"); j=mem_name.length(); %> <%=mem_name %> <% i=i+1; if (i==12) { out.println("
"); i=0; } else if(j==2) out.println("    "); else if(j==3) out.println("  "); } rs2.close(); conn.close(); %>