A timestamp-datatype automatically updates itself with the current date if
the row has changed, so, in this case timestamp is not the preferred
datatype. As far as i know, in MySQL Procedures are just for output,
Triggers are not implemented...Only method would be to insert this field
using insert .... select(data_add(max_date ,interval 2 weeks)) as date from
..., but i don't know how to get max_date if you are not allowed to use
order by. This is why you would have to store it an a variable then update
etc...
My suggestion is to take a simple date-field and manage it by your program.

----- Original Message -----
From: "stan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 9:37 PM
Subject: Help! With sql date type


> Hello,
> I would like to add a date column to my sql database table that
> auto-increments the date's week field by 2 weeks for every entry.
> I have set up the mysql database table to automatically take entries for
> ad submissions and I want to timestamp each entry with the calculated
> date.  Is this possible?
> Thanks Stan
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to