日期:2014-05-17 浏览次数:20748 次
String sql1="select count(*) as total from jydj";//得到总行数 String sql2="select * from jydj order by index desc"; DB db=new DB(); ResultSet rs1=db.exeQuery(sql1);//得到行数 ResultSet rs=db.exeQuery(sql2); try{ db.DBclose();//关闭数据库连接 }catch(Exception e){ e.printStackTrace(); }
<tr> <td><%=rs.getString("xingMing")%></td> <td><%=rs.getString("keShouNeiRong") %></td> <td><%=rs.getString("xingBie") %></td> <td><%=rs.getString("zhuangTai") %></td> <td><%=rs.getString("nianJi") %></td> <td><%=rs.getString("zhuanYe") %></td> <td><%=rs.getString("index") %></td> </tr>