Re: Using NOW() with MySQL
[prev]
[thread]
[next]
[Date index for 2004/08/05]
On Thu, Aug 05, 2004 at 12:46:17PM +0100, tom@xxxxxxxx.xxx wrote:
> I have tried all sorts of variations, amazed that I could not just
> add the key-value pair created=>NOW() into the create hash.
Why are you amazed? How would you expect this to work? NOW() is magical
in your database, and every database has a large list of similar
functions. Class::DBI can't know what to do with these.
There has been talk of coming up with a syntax to allow this, but it's
never really gotten anywhere.
The normal answer in this sort of case (other than 'use a timestamp
column') is to either change the SQL for create, or use triggers.
There's a discussion on the wiki about this:
http://www.class-dbi.com/cgi-bin/wiki/index.cgi?SettingDefaultValues
Tony
|
|
Re: Using NOW() with MySQL
Tony Bowden 12:02 on 05 Aug 2004
|