[nycphp-talk] mySQL datetime fields default now() fails
Phil Powell
soazine at erols.com
Sun Sep 7 08:31:07 EDT 2003
I have a mySQL database table with a column field datatype of datetime that I set up in the original create table statement like this:
create table nnet_usermetadata (
...
nnet_record_entered datetime default 'now()'
)
However, upon execution, each time a record is entered into nnet_usermetadata the results are:
00-00-0000 00:00:00
Is there a way I can always ensure that the current date and time are always entered into the datetime field? I would prefer to not have a server-side PHP or any other scripting solution because by doing so would mean I would have to alter my table to do so, and after the barrage of questions you've received from me would you trust me to do so effectively?
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030907/5f629e63/attachment.html>
More information about the talk
mailing list