Quoting Michael Stassen <[EMAIL PROTECTED]>:

> Defaults must be constants, not functions.

Ahh. Thanks for the info.
 
> You want a TIMESTAMP column, not INT.  See 
> <http://www.mysql.com/doc/en/DATETIME.html>.

I want to store my time in unix timestamp format though, not in a mmddyy type.


> Michael
> 
> Keith Bussey wrote:
> 
> > Hi all,
> > 
> > I was wondering if it is possible to have the default value of an integer 
> > field be the current UNIX timestamp ? 
> > 
> > MySQL doesn't allow me to use .... not null default UNIX_TIMESTAMP() .....
> > 
> > If anyone knows a way of achieving this, it would be great =)
> > 
> > Also, I currently use "int(10) unsigned not null default 0" for my unix 
> > timestamp fields, is there perhaps a more efficient field type I should be
> 
> > using?
> > 
> > Thx
> > 
> 
> 

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

Reply via email to