paihang2.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:1k
源码类别:

百货/超市行业

开发平台:

Java

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