Hi there,
I am trying to have a default value put into a date/time field. I can't find a way to do this using the database manager. Can you tell me how this can be done please?
Thanks
Phil.
Solved! Go to Solution.
Hi,
I don't believe you are able to use a default value of NOW().
Rather than having two hidden form fields, I would make my INSERT statement (using PHP for the example) as follows:
$query = "INSERT INTO table (field, messageDated) VALUES( \"".$value1."\", NOW() )";
I have to confess I haven't tried this yet myself, but I would be interested to hear how it works for you.
Peter
Hi,
I don't believe you are able to use a default value of NOW().
Rather than having two hidden form fields, I would make my INSERT statement (using PHP for the example) as follows:
$query = "INSERT INTO table (field, messageDated) VALUES( \"".$value1."\", NOW() )";
I have to confess I haven't tried this yet myself, but I would be interested to hear how it works for you.
Peter