"Jacque Scott" <[EMAIL PROTECTED]> wrote:
> 
> I have a DateTime data type for one of my fields.  If an entry is being
> INSERTed then I want the DateTime to be NOW().  I want this done
> automatically and not have to set me SQL str to do this.  I have tried
> to set the default as NOW() but it will insert
> 0000-00-00 ...  I don't want this, I want the current date.  I don't
> want to use TimeStamp because I only want this done when there is an
> INSERT not UPDATE.  
> 
> Does anyone have a suggestion?

Default value must be constant. If you don't want to use TIMESTAMP column, you should 
use NOW() function in the INSERT statement.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to