the date and mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
acwe88
Forum Newbie
Posts: 24
Joined: Tue Nov 07, 2006 10:47 am

the date and mysql

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

look into DATE_DIFF() (a MySQL function) or comparing the CURRENT_DATE() with the expiration date - INTERVAL 30 DAY
Post Reply