paihang2.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:1k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2.  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  3.                                     <%
  4. sql="select top 11 * from hw order by hw_buys DESC";
  5. rs=mdb.executeQuery(sql);
  6. if(!rs.next())
  7. {
  8. out.print("本站目前没有成交任何商品");
  9.  }else
  10. {
  11. rs.previous();
  12. i=0;
  13. int hw_id,daili;
  14. String hw_name;
  15. while(rs.next()&i<=10){
  16. hw_id=rs.getInt("hw_id");
  17. hw_name=rs.getString("hw_name");
  18. daili=rs.getInt("daili");
  19.                   %>
  20.                                    
  21.                                       <tr> 
  22.                                         <td width="70%" height="22" bgcolor="#F5EFE7">&nbsp; 
  23.                                           <a href="views.jsp?hw_id=<%=hw_id%>"><%=hw_name%></a></td>
  24.                                         <td width="30%" bgcolor="#F5EFE7"><%=daili%></td>
  25.                                       </tr>
  26.                                     
  27.                                     <%
  28.     i=i+1;                                                   
  29.      
  30.       }
  31. }
  32.  %>                                 </table>