注册 登录
编程论坛 ASP技术论坛

怎么调用数据库某子分类下的全部信息?

nexteye 发布于 2012-12-02 09:01, 332 次点击
小弟没学过ASP,只是懂一点简单的。
碰到一个问题,请教一下,或者这对你们是很容易的!
程序代码:
  dim datawhere'
      if SortPath<>"" then'
         datawhere="where ViewFlag and Instr(SortPath,'"&SortPath&"')>0 "
      else
         datawhere="where ViewFlag "
      end if
只有本站会员才能查看附件,请 登录


我只要调用sortpath下的符合37这个数值的数据。
请帮一下!
4 回复
#2
cnfarer2012-12-02 10:40
这是SQL查询语句问题,与ASP关系不大.不同数据库会有所差别.
#3
nexteye2012-12-02 10:55
所以想问下怎么写这个查询语句!
#4
ysf01812012-12-02 16:23
'不需要考虑速度问题。
rs.open"select * from 表",conn,1,1
do while not rs.eof
   if instr("字段","37") > 0 then
      response.write "输出"  
   end if
rs.movenext
loop
rs.close
#5
nexteye2012-12-02 17:26
程序代码:
function ContentList(ID)
  dim SortPath
      SortPath=request.QueryString("SortPath")
  dim idCount
  dim datafrom
      datafrom="Ameav_News"
  dim datawhere'
      if instr(SortPath,"37")>0 then
         datawhere="where ViewFlag and Instr(SortPath,'"&SortPath&"')>0"
      else
         datawhere="where ViewFlag "
      end if

还是没起什么作用,因为我太菜了,不知道怎么办?
1