desithugg Posted August 5, 2006 Share Posted August 5, 2006 umm i have a field in one of my tables calledfield:postDate type:datetimedefault:0000-00-00 00:00:00umm if i wanna insert time in there using a quesry how can i do so Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 5, 2006 Share Posted August 5, 2006 If you mean the current time you are running the query, use NOW() Quote Link to comment Share on other sites More sharing options...
desithugg Posted August 5, 2006 Author Share Posted August 5, 2006 o kk thanx Quote Link to comment Share on other sites More sharing options...
tomfmason Posted August 5, 2006 Share Posted August 5, 2006 You can do it like this.[code=php:0]$sql= mysql_query("INSERT INTO yourtable(postdate) VALUES (now())") or die (mysql_error());[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.