hoton.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.                       <tr> 
  4.                         <td height="20" align="center" bgcolor="#DBC2B0"><b>热卖型号</b></td>
  5.                       </tr>
  6.                       <tr> 
  7.                         <td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  8.                             <tr> 
  9.                               <td bgcolor="#F5EFE7"> 
  10.                                 <%
  11.   
  12. sql="select top 10 * from hw where sort_id="+sort_id+" order by hw_buys desc" ;                  
  13.  rs=mdb.executeQuery(sql);                
  14. int count=0;
  15. if(rs!=null){
  16.   while(rs.next()) 
  17.    {
  18.    count++;
  19.    if(count>8){break;}
  20.              out.print("<li><A href=views.jsp?hw_id="+rs.getInt("hw_id")+">"+rs.getString("hw_name")+" "+rs.getInt("hw_buys")+"</A></li>");
  21.                                              
  22.        }                                    
  23. }
  24. else{
  25. out.print("目前没有该类商品的热销产品"+sort_id);
  26. }
  27.                                    
  28.                                    
  29. %>
  30.                               </td>
  31.                             </tr>
  32.                           </table></td>
  33.                       </tr>
  34.                     </table>