开发者

System date capturing in to data base

i create a registration form in my jsp project.mysql be the database.i want to insert system date automatically开发者_JS百科 in datebase in the registration time.


Have a look at Date and Time functions of mysql. This may help you.


You can have a "date_created" field in a table, defined as

date_created timestamp not null default current_timestamp

When you perform an insert on the table ignoring this column, it will automatically be set to the current time of the mysql server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜