Page 1 of 1

the date and mysql

Posted: Mon Jan 22, 2007 10:50 am
by acwe88
Hi there

before i begin ill explain what i am doing,

I register domain names for people and businesses i know.

I have a form which allows me to put in the domain name and the day the domain name has to be renewed.

So what i need is to get this renewal date from the database and take away 30 days. So I know 30 days in advance that the name has to be renewed.

Could someone point me in the right direction

Any help will be much appreciated

Thanks
Alex

Posted: Mon Jan 22, 2007 11:01 am
by feyd
look into DATE_DIFF() (a MySQL function) or comparing the CURRENT_DATE() with the expiration date - INTERVAL 30 DAY