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

百货/超市行业

开发平台:

Java

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