首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

这段ASP代码要如何修改。

2012-05-10 
这段ASP代码要怎么修改。。。这段代码--function chongzhi(jiekous,orders,usernames,jines)chongzhifalseSe

这段ASP代码要怎么修改。。。
这段代码
--
function chongzhi(jiekous,orders,usernames,jines)
chongzhi=false
Set rs3=Server.CreateObject("ADODB.recordset")
mysq3="select * from czjl where trade_no='"&orders&"'"
rs3.open mysq3,conn,1,3
if rs3.eof and rs3.bof then
chongzhi=true
rs3.addnew
rs3("types")=jiekous
rs3("trade_no")=orders
rs3("jine")=jines
rs3("cztime")=now()
rs3("username")=usernames
rs3.update
else
chongzhi=false
end if
--
要怎么插入到下面的代码中运行?
--
set rs=Cls_Site.Conn.execute("select id from user where id="&uid&"")
if rs.eof then
rs.close()
response.Write("{""uid"":"""&uid&""",""vcpoints"":"""&vcpoints&""",""tid"":"""&tid&""",""status"":""failure"",""errno"":""1005""}")
response.End()
end if
rs.close()

Cls_Site.Conn.execute("update user set jine=jine+"&vcpoints&" where id="&uid&"")
--

[解决办法]
第一,你上半部分代码是一个函数,并且没发现 end function

第二,代码不用插到下边,函数如果完整,可以直接调用

热点排行