回 帖 发 新 帖 刷新版面

主题:看看这段代码,是什么意思

<%
 dim typeto,idtype
typeto=trim(request("typeto"))
idtype=trim(request("idtype"))
 %>

<% 
set rs=server.createobject("adodb.recordset")
sql="update "& typeto &" set dj=dj+1  where zid = "&request("zid")
rs.open sql,conn,1,3
sql="select * from "& typeto &" where zid = "&request("zid")
rs.open sql,conn,1,1 
name1=(rs.Fields.Item("username").Value)
fdat=(rs.Fields.Item("dat").Value)
Num1=Cstr(year(fdat))
Num2=Cstr(month(fdat))
Num3= Cstr(day(fdat))
%>

回复列表 (共1个回复)

沙发

<%
 dim typeto,idtype
typeto=trim(request("typeto")) // 获得typeto的值
idtype=trim(request("idtype")) // 获得idtype的值
 %>

<% 
set rs=server.createobject("adodb.recordset") // 创建recordset对象
sql="update "& typeto &" set dj=dj+1  where zid = "&request("zid") // 将表typeto中zid=request("zid")的记录中的dj+1
rs.open sql,conn,1,3
sql="select * from "& typeto &" where zid = "&request("zid")
rs.open sql,conn,1,1 
name1=(rs.Fields.Item("username").Value) //得到表typeto中username的值
fdat=(rs.Fields.Item("dat").Value) //得到表typeto中dat的值
Num1=Cstr(year(fdat)) //取年份
Num2=Cstr(month(fdat)) //取月份
Num3= Cstr(day(fdat)) //取日期
%>

我来回复

您尚未登录,请登录后再回复。点此登录或注册