functions as default value

From: Date: Mon, 28 Apr 2003 07:45:37 +0000
Subject: functions as default value
Groups: php.db 
Request: Send a blank email to php-db+get-27399@lists.php.net to get a copy of this message
If I want the default value of a date column to be the current date, is there a way to use the function CURDATE() as the default, or do I need to check with PHP (the data is being entered via a PHP form) if the date has been entered and if not insert CURDATE() as the value? The question is whether I can set up the table to do this work for me, or if I need to program the insert script to check this. I am using MySQL 4.0.12. TIA, -Lisi

« previous php.db (#27399) next »