ASP 〔手工调用指定文章 〕怎么写?
原来是这样的:<%=WebContent()%>————————————functionWebContent()dimIDID=request.QueryString("...
原来是这样的:
<%=WebContent()%>
————————————
function WebContent()
dim ID
ID=request.QueryString("ID")
dim rs,sql
set rs = server.createobject("adodb.recordset")
if request.QueryString("ID")="" then
sql="select top 1 ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag order by enSequence asc"
else
sql="select ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag and ID="&ID
end if
rs.open sql,conn,1,3
if rs.recordcount = 1 then
response.Write(rs("encontent"))
else
response.Write("NO data")
end if
——————————————————————————————————
现在我要在某一页上固定调用某ID的内容,怎么写? 展开
<%=WebContent()%>
————————————
function WebContent()
dim ID
ID=request.QueryString("ID")
dim rs,sql
set rs = server.createobject("adodb.recordset")
if request.QueryString("ID")="" then
sql="select top 1 ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag order by enSequence asc"
else
sql="select ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag and ID="&ID
end if
rs.open sql,conn,1,3
if rs.recordcount = 1 then
response.Write(rs("encontent"))
else
response.Write("NO data")
end if
——————————————————————————————————
现在我要在某一页上固定调用某ID的内容,怎么写? 展开
展开全部
function WebContent()
dim ID
ID="56" '这里的56就是你固定的文章ID,根据你的情况修改
dim rs,sql
set rs = server.createobject("adodb.recordset")
if request.QueryString("ID")="" then
sql="select top 1 ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag order by enSequence asc"
else
sql="select ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag and ID="&ID
end if
rs.open sql,conn,1,3
if rs.recordcount = 1 then
response.Write(rs("encontent"))
else
response.Write("NO data")
end if
END FUNCTION
dim ID
ID="56" '这里的56就是你固定的文章ID,根据你的情况修改
dim rs,sql
set rs = server.createobject("adodb.recordset")
if request.QueryString("ID")="" then
sql="select top 1 ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag order by enSequence asc"
else
sql="select ID,enAboutName,enSource,enContent,GroupID,Exclusive,enClickNumber,AddTime from Ameav_About where enViewFlag and not enChildFlag and ID="&ID
end if
rs.open sql,conn,1,3
if rs.recordcount = 1 then
response.Write(rs("encontent"))
else
response.Write("NO data")
end if
END FUNCTION
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询