Jump to content

Archived

This topic is now archived and is closed to further replies.

desithugg

inserting time

Recommended Posts

umm i have a field in one of my tables called
field:postDate
type:datetime
default:0000-00-00 00:00:00

umm if i wanna insert time in there using a quesry how can i do so

Share this post


Link to post
Share on other sites
You can do  it like this.

[code=php:0]$sql= mysql_query("INSERT INTO yourtable(postdate) VALUES (now())") or die (mysql_error());[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.