Asp类 的数据库领域(2)
sql = "Select * From ArticleClass where ClassName = '"&lanmu&"' order By ClassID Desc"
'response.write sql&"<br>"
set rs=Server.CreateObject("adodb.recordset")
rs.open sql, conn, 1, 1
if not rs.eof then
ClassID_p = rs("ClassID")
end if
rs.close
set rs = nothing
if riqi = 1 then
riqi_p = " order By UpdateTime Desc"
else
riqi_p = ""
end if
sql = "Select * From Article where ClassID = "&ClassID_p&""&riqi_p
set rs=Server.CreateObject("adodb.recordset")
rs.open sql, conn, 1, 1
rs.PageSize = k
if not rs.eof then
rs.AbsolutePage = page
end if
i = 0
do while not rs.eof and i < n
i = i + 1
rs.movenext
loop
'response.write "rs<br>"
if n = i then
title_p = rs("Title")
id_p = rs("ArticleID")
'response.write title_p
'response.write id_p
else
title_p = null
id_p = null
end if
rs.close
set rs = nothing
end Function
'----------------------------------------
'
'属性写 标题
Public Property Let title(byval v)
title_p = v
End Property
'属性读 标题
Public Property Get title()
title = title_p
End Property
'属性写 标题ID
Public Property Let id(byval v)
id_p = v
内容版权声明:除非注明,否则皆为本站原创文章。