当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 用程序如何添加自己的路径到path中去啊 ......
    摘要: select a.*,b.* from xx a,yy b where a.id*=b.id; 这和select a.*,b.* from xx a,yy b where a.id=b.id(+);有什么不同,下有这个是左连接吧,oracle跟sqlserver还是有区别呢? ......


小妹我不懂ASP,现有一个问题高分各位大虾,着啊,在线等....

我的网页左边有一个商品分类,我希望最后两种商品分类链接到class2.asp而不是class.asp。怎么改啊?文件代码如下:  
     
  <table   width="178"   border="0"   cellspacing="0"   cellpadding="0">  
          <tr>    
          <td   height="14">    
              <table   cellspacing=0   cellpadding=0   width=170   height="20">  
                  <tr>    
                      <td>   <img   src="image/images/main/cpfl.gif"   width="178"></td>  
                  </tr>  
              </table>  
          </td>  
      </tr>  
     
      <tr>    
          <td>    
              <table   width="100%"   border="0"   align="center"   cellpadding="0"   cellspacing="0">  
                 
                  <tr>    
                      <td   height="20"   align="center">    
                          <%  
  set   rs=server.CreateObject("adodb.recordset")  
  rs.open   "select   *   from   shop_anclass   order   by   anclassidorder",conn,1,1  
  if   rs.recordcount=0   then  
  response.write   "<br>目前没有商品分类"  
  else  
  while   not   rs.eof  
  %>  
                          <table   width=100%   cellspacing="0"   cellpadding="0"   border="0">  
                              <tr   align="center">    
                                  <td   height="22"   colspan=3     style="CURSOR:   hand"   onMouseOver="this.bgColor=#E3F4F0;"   onMouseOut="this.bgColor=#FFFFFF;"><font   color="#FF6600"><a   href=class.asp?lx=big&anid=<%=rs("anclassid")%>><b><font   color="#FF6600"><%=rs("anclass")%></font></b></a></font></td>  
                              </tr>  
                              <%  
          set   rs_s=server.CreateObject("adodb.recordset")  
          rs_s.open   "select   *   from   shop_nclass   where   anclassid="   &   rs("anclassid")   &   "   order   by   nclassidorder",conn,1,1  
          if   rs_s.recordcount=0   then    
  %>  
                              <tr>    
                                  <td   colspan=2   height="22">&nbsp;&nbsp;&nbsp;暂无小分类</td>  
                              </tr>  
                              <%  
          else  
          i=0  
  while   not   rs_s.eof  
  %>  
                              <tr>    
          <td   width=4%   height="22"   ></td>  
                                  <td   width=47%   height="22"   align=center   style="CURSOR:   hand"   onMouseOver="this.bgColor=#E3F4F0;"   onMouseOut="this.bgColor=#FFFFFF;"   ><a   href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a></td>  
  <%rs_s.movenext  
  if   rs_s.eof   then    
  else  
  %>  
                                  <td   width=49%   height="22"   align=center   style="CURSOR:   hand"   onMouseOver="this.bgColor=#E3F4F0;"   onMouseOut="this.bgColor=#FFFFFF;"><a   href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a></td>  
      </tr>  
                              <%  
  rs_s.movenext  
  end   if%>  
                              <%  
  wend  
          end   if  
  %>  
                              <tr>    
                                  <td   colspan=3   height=1   background="images/bj_x1.gif"   ></td>  
                              </tr>  
                          </table>  
                          <%  
          rs_s.close  
          set   rs_s=nothing  
  rs.movenext  
  wend  
  end   if  
  rs.close  
  set   rs=nothing  
  %>  
                      </td>  
                  </tr>  
              </table>  
          </td>  
      </tr>  
  </table>  
 

NO.1   作者: coolwindkaka

<%If   Rs("anclassid")=N   Or   Rs("anclassid")=M   Then%>  
  <a   href="class2.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a>  
  <%Else%>  
  <a   href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a>  
  <%End   If%>  
  ------------------------------------------------  
  N和M为你要链接过去的类别ID

NO.2   作者: tigerwen01

<%If   Rs("productname")="最后两种产品的名称"   Or   Rs("productname")="最后两种产品2的名称"   Then%>  
  <a   href="class2.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a>  
  <%Else%>  
  <a   href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a>  
  <%End   If%>  
  ------------------------------------------------  
  N和M为你要链接过去的类别ID

NO.3   作者: jinghu009

你可以用SQL查询语句来实现啊!  
  例:  
  显示最后2条记录  
  select   top   2   *   from   [tablename]  
  order   by   [id]   desc  
  其他的具体链接就按你的需求来写了,若还是实现不了  
  可以QQ35872871   和我联系!!!  
   
   
 

NO.4   作者: jingxiaoping

修改后的内容如下:  
   
  <table   width="178"   border="0"   cellspacing="0"   cellpadding="0">  
          <tr>    
          <td   height="14">    
              <table   cellspacing=0   cellpadding=0   width=170   height="20">  
                  <tr>    
                      <td>   <img   src="image/images/main/cpfl.gif"   width="178"></td>  
                  </tr>  
              </table>  
          </td>  
      </tr>  
     
      <tr>    
          <td>    
              <table   width="100%"   border="0"   align="center"   cellpadding="0"   cellspacing="0">  
                 
                  <tr>    
                      <td   height="20"   align="center">    
                          <%  
  set   rs=server.CreateObject("adodb.recordset")  
  rs.open   "select   *   from   shop_anclass   order   by   anclassidorder",conn,1,1  
  if   rs.recordcount=0   then  
  response.write   "<br>目前没有商品分类"  
  else  
  while   not   rs.eof  
  %>  
                          <table   width=100%   cellspacing="0"   cellpadding="0"   border="0">  
                              <tr   align="center">    
                                  <td   height="22"   colspan=3     style="CURSOR:   hand"   onMouseOver="this.bgColor=#E3F4F0;"   onMouseOut="this.bgColor=#FFFFFF;"><font   color="#FF6600"><a   href=class.asp?lx=big&anid=<%=rs("anclassid")%>><b><font   color="#FF6600"><%=rs("anclass")%></font></b></a></font></td>  
                              </tr>  
                              <%  
          set   rs_s=server.CreateObject("adodb.recordset")  
          rs_s.open   "select   *   from   shop_nclass   where   anclassid="   &   rs("anclassid")   &   "   order   by   nclassidorder",conn,1,1  
          if   rs_s.recordcount=0   then    
  %>  
                              <tr>    
                                  <td   colspan=2   height="22">&nbsp;&nbsp;&nbsp;暂无小分类</td>  
                              </tr>  
                              <%  
          else  
          i=0  
  while   not   rs_s.eof  
      if   rs("anclassid")=ID号1   or   rs("anclassid")=ID号2   then  
          nreturn="class2.asp"  
      else  
          nreturn="class.asp"  
      end   if  
  %>  
                              <tr>    
          <td   width=4%   height="22"   ></td>  
                                  <td   width=47%   height="22"   align=center   style="CURSOR:   hand"   onMouseOver="this.bgColor=#E3F4F0;"   onMouseOut="this.bgColor=#FFFFFF;"   ><a   href="<%=nreturn%>?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a></td>  
  <%rs_s.movenext  
  if   rs_s.eof   then    
  else  
      if   rs("anclassid")=ID号1   or   rs("anclassid")=ID号2   then  
          nreturn="class2.asp"  
      else  
          nreturn="class.asp"  
      end   if  
  %>  
                                  <td   width=49%   height="22"   align=center   style="CURSOR:   hand"   onMouseOver="this.bgColor=#E3F4F0;"   onMouseOut="this.bgColor=#FFFFFF;"><a   href="<%=nreturn%>.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a></td>  
      </tr>  
                              <%  
  rs_s.movenext  
  end   if%>  
                              <%  
  wend  
          end   if  
  %>  
                              <tr>    
                                  <td   colspan=3   height=1   background="images/bj_x1.gif"   > </td>  
                              </tr>  
                          </table>  
                          <%  
          rs_s.close  
          set   rs_s=nothing  
  rs.movenext  
  wend  
  end   if  
  rs.close  
  set   rs=nothing  
  %>  
                      </td>  
                  </tr>  
              </table>  
          </td>  
      </tr>  
  </table>

NO.5   作者: iuhxq

小妹我是来接分的


    摘要: 声明一下,本人只是探讨一下技术问题,绝没有此地无银三百两的意思。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE