ASP归还日期,各位大侠帮我看下这段代码,还书成功了,但是把数据库的归还时间全部都变成一样的了。谢谢!
<%iftrim(request.querystring("action"))="returnbook"thenlogid=request.form("logid")ti...
<%
if trim(request.querystring("action"))="returnbook" then
logid=request.form("logid")
tiaoxingma=request.form("tiaoxingma")
Set rs=conn.execute("update booklog set ghsj=now()")
Set rs=conn.execute("update booklog set leixing=false where id="&logid&"")
set rs=conn.execute("update book set yijie=yijie-1 where tiaoxingma='"&tiaoxingma&"'")
response.Write "<script>"
response.Write "alert('还书成功!');"
response.write "window.location.href='returnbook.asp';"
response.write "</script>"
response.end
end if 展开
if trim(request.querystring("action"))="returnbook" then
logid=request.form("logid")
tiaoxingma=request.form("tiaoxingma")
Set rs=conn.execute("update booklog set ghsj=now()")
Set rs=conn.execute("update booklog set leixing=false where id="&logid&"")
set rs=conn.execute("update book set yijie=yijie-1 where tiaoxingma='"&tiaoxingma&"'")
response.Write "<script>"
response.Write "alert('还书成功!');"
response.write "window.location.href='returnbook.asp';"
response.write "</script>"
response.end
end if 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询