数据库里的基本结构都是这样
ArticleID Contents Title AuthorID AuthorName ReID
然后,主题帖的reid是0,非主题帖的reid就是它回复的那帖子
然后递归来读取。
function searchar(mainid)
SQL="select * from tablename where reid="&mainid
set rst=server.createobejct("adodb.recordset")
rst.open SQL,conn2,3
while not rst.eof
searchar(rst("articleid"))
wend
rst.close
set rst=nothing
end function