MySQL Ques: default for date field be current date

From: Date: Wed, 18 Dec 2002 05:22:58 +0000
Subject: MySQL Ques: default for date field be current date
Groups: php.db 
Request: Send a blank email to php-db+get-24249@lists.php.net to get a copy of this message
I'm trying to convert an ASP/Access tutorial to PHP/MySQL and have a question regarding MySQL. In Access one can create a date field and set the default to "Date()" to get the current date but according to the mysql manual: http://www.mysql.com/doc/en/CREATE_TABLE.html > Default values must be constants. This means, for example, that you cannot set > the default for a date column to be the value of a function such as NOW() or > CURRENT_DATE. Is there any other way to have MySQL automate this? I've heard of something called stored procedures but am unfamiliar. -- Must this be done on the scripting side? Thanks, ~ Mike -- MikeZornek.com New blog, new Q&A column, new content everywhere! http://www.mikezornek.com

« previous php.db (#24249) next »