ASP写数据库时如何增加时间字段
<!--#includefile="conn.asp"--><%d_address=request.form("address")d_name=request.form(...
<!--#include file="conn.asp"-->
<%
d_address=request.form("address")
d_name=request.form("name")
d_phone=request.form("phone")
exec="insert into guest(d_address,d_name,d_phone)values('"+d_address+"','"+d_name+"','"+d_phone+"')"
conn.execute exec
conn.close
set conn=nothing
response.redirect "list.asp"
%>
时间不用从客户那传来,而是在写入数据库时,取现在的时间,如何增加一段代码呢?要代码哦谢谢
d_time=now()
exec="insert into guest(d_address,d_name,d_phone,d_time)values('"+d_address+"','"+d_name+"','"+d_phone+"','"+d_time+"')"
时间/日期型的字段,该怎么添加啊
我这样报错了 展开
<%
d_address=request.form("address")
d_name=request.form("name")
d_phone=request.form("phone")
exec="insert into guest(d_address,d_name,d_phone)values('"+d_address+"','"+d_name+"','"+d_phone+"')"
conn.execute exec
conn.close
set conn=nothing
response.redirect "list.asp"
%>
时间不用从客户那传来,而是在写入数据库时,取现在的时间,如何增加一段代码呢?要代码哦谢谢
d_time=now()
exec="insert into guest(d_address,d_name,d_phone,d_time)values('"+d_address+"','"+d_name+"','"+d_phone+"','"+d_time+"')"
时间/日期型的字段,该怎么添加啊
我这样报错了 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询