Re: Using NOW() with MySQL

[prev] [thread] [next] [Date index for 2004/08/05]

From: Tony Bowden
Subject: Re: Using NOW() with MySQL
Date: 12:02 on 05 Aug 2004
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

Using NOW() with MySQL
tom 11:46 on 05 Aug 2004

Re: Using NOW() with MySQL
karjala_lists 11:55 on 05 Aug 2004

Re: Using NOW() with MySQL
karjala_lists 12:15 on 05 Aug 2004

Re: Using NOW() with MySQL
Tony Bowden 12:02 on 05 Aug 2004

Re: Re: Using NOW() with MySQL
tom 16:04 on 06 Aug 2004

Re: Re: Using NOW() with MySQL
Tony Bowden 16:26 on 06 Aug 2004

Re: Re: Using NOW() with MySQL
Tim Bunce 16:30 on 06 Aug 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52