标题:有分类(家电、医疗、工业)产品,怎么分类显示?
取消只看楼主
皮皮哎淘淘
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2013-6-9
结帖率:100%
已结贴  问题点数:20 回复次数:2 
有分类(家电、医疗、工业)产品,怎么分类显示?
数据库产品表

数据库产品分类表

程序代码:
<%
   sql = ""
   sqlc = ""
   isAdd = 1
   content = ""
   lm = ""
   if parentid <> "" then
     sql = "select * from producttype where id = "&parentid
     sqlc = "select * from producttype where lmid = '"&parentid&"'"
   else
     if id <> "" then
        sql = "select * from producttype where id = "&id
        sqlc = "select * from producttype where lmid = '"&id&"'"
     else
        sql = ""
        sqlc = ""
     end if
   end if
       if sql = ""  then
          lm = "设计案例"
          linkUrl = "case_list.asp"
        else
       
           Set rs = Server.CreateObject("ADODB.RecordSet")
           rs.Open sql,conn,1,1
         if not rs.eof then
          isAdd = rs("isAdd")
          lm = rs("lm")
          content = rs("content")
linkUrl = ""
   if  rs("linkUrl") is null or  rs("linkUrl") = ""  then
                 linkUrl = "case_list.asp?id="&rs("id")
              end if
    end if
  rs.close
  set rs = nothing
    end if
%>

    <div class="caseboxList">
<% if  isAdd = 1  then %>
      <ul class="caseboxListPro">
   <%
          if id <> "" then
        sql = "select * from products where lm = "&id&" order by sortid,bookid desc"
          else
                 sql = "select * from products order by sortid,bookid desc"
          end if 
%>
response.write(sql)结果是select * from products order by sortid,bookid desc,求高手指点
搜索更多相关主题的帖子: content 数据库 产品 工业 
2013-06-13 16:00
皮皮哎淘淘
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2013-6-9
得分:0 
数据库产品表连着的两张图并排着看
2013-06-14 14:36
皮皮哎淘淘
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2013-6-9
得分:0 
只显示家用电器的产品行么?
2013-06-17 10:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-415093-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.036848 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved