[pLog-svn] r5440 - plog/trunk/install

Oscar Renalias oscar at renalias.net
Thu May 24 13:29:30 EDT 2007


At least in MySQL 4 it wasn't necessary, as it would automatically  
update the first TIMESTAMP column to the current date on INSERT and  
UPDATE, there was no need to specify anything at all (as far as I  
remember)

And since we're still targetting MySQL 4 as the base MySQL version,  
we should be careful about these things...

Oscar

On 24 May 2007, at 17:14, Jon Daley wrote:

>  	Hasn't this code been in "forever"?  Oh, it isn't in dbschemas.
> Somewhere, we had code that used to update the date automatically,  
> maybe
> it doesn't do it any more?
>
> On Thu, 24 May 2007, Oscar Renalias wrote:
>> And by the way is this syntax compatible with MySQL 4? I mean the "on
>> update CURRENT_TIMESTAMP" bit...
>>
>> On 5/24/07, Jon Daley <plogworld at jon.limedaley.com> wrote:
>>>         I'd be in favor of killing this.  It hasn't gotten me in  
>>> a long
>>> time, but it is a pain if you don't remember to set date=date in  
>>> your sql
>>> query.  It makes sense for the modification_date, and maybe now  
>>> that we
>>> are using it, we could put it just for that column.
>>>
>>> On Thu, 24 May 2007, Ahmad Saleh wrote:
>>>> why you are update the date field to be CURRENT_TIMESTAMP on each
>>>> update operation on lt_articles table?
>>>>
>>>> CREATE TABLE `lt_articles` (
>>>> `id` int(10) unsigned NOT NULL auto_increment,
>>>> `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update
>>>> CURRENT_TIMESTAMP, ...
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list