2007-02-05 12:19:21 UTC
For storing the date and time, I have a datetime field that is set to "not null". I've tried leaving that field blank when I'm processing a blog submission:
insert into blogs values '$title', 'body', ' ';
(notice the empty quotation marks)
but, when I do that, the field in the database is filled with zeros: 0000-00-00 00:00:00 . I'm using this field as my primary key, so I can't have them all filled with 0's!
How do I get the database to enter the current date and time? I've tried changing the field to a timestamp, but that didn't help.
I'm using PHP 5.