怎么加时间更新功能
下面这段代码是完整的删除代码,里面有四个表,分别是"hack" "hire" "sell" "buy".现在要它做出判断,如果我点击的是"更新
"它怎么把与之相对应的四个表里面的"data"(时间字段),字段更新为现在的时间.
<%
dim checkbox,strSql
checkbox=request("checkbox")
if checkbox="" then %>
<SCRIPT LANGUAGE=vbscript>
<!--
msgbox("您未选择要更新或删除的记录!")
Sub window_onload
window.history.back
End Sub
-->
</SCRIPT>
<% response.end
end if
checkbox=replace(checkbox," ","")
checkbox=replace(checkbox,","," or id=")
if session("house")="hack" then
strSql="delete from [hack] where id=" & checkbox
end if
if session("house")="hire" then
strSql="delete from [hire] where id=" & checkbox
end if
if session("house")="sell" then
strSql="delete from [sell] where id=" & checkbox
end if
if session("house")="buy" then
strSql="delete from [buy] where id=" & checkbox
end if
conn.execute(strSql)
response.redirect "view_house.asp?house=" & session("house")
%>