Gossamer Forum
Home : General : Databases and SQL :

Inserting A Date into MySQL

Quote Reply
Inserting A Date into MySQL
Hi All,

Im having a problem, trying to do the following. I have a table which lists users domain names and when they registered them and how long for.

Now, when it comes to renewing the domains, it updates the date to the date in which they actually paid for the renewal, but i dont want this, i want it to add the ammount of years they have renewed for.

In the table i have domain_period_yr which is a numeric value of years and, domain_date.

What i want to happen is regardless of when they renew the domain it should just add the domain_period_yr to the date. i.e 2002-01-01 would become 2004-01-01 if the domain period was 2 years.

Any ideas how to achieve this would be much appreciated.
Regards

Mark
http://www.host4.me.uk

No doubt i'll be back for more answers!
Subject Author Views Date
Thread Inserting A Date into MySQL mdj1 13749 Sep 21, 2003, 7:43 PM
Thread Re: [mdj1] Inserting A Date into MySQL
lanerj 13415 Sep 21, 2003, 8:55 PM
Thread Re: [lanerj] Inserting A Date into MySQL
mdj1 13376 Sep 21, 2003, 11:06 PM
Thread Re: [mdj1] Inserting A Date into MySQL
mdj1 13409 Sep 21, 2003, 11:24 PM
Post Re: [mdj1] Inserting A Date into MySQL
Andy 13309 Sep 22, 2003, 2:29 AM
Thread Re: [mdj1] Inserting A Date into MySQL
lanerj 13423 Sep 22, 2003, 5:23 AM
Post Re: [lanerj] Inserting A Date into MySQL
mdj1 13240 Oct 1, 2003, 10:15 AM