Sort data with specific time

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
Portnumbay
Forum Newbie
Posts: 14
Joined: Mon Jul 05, 2010 1:22 am

Sort data with specific time

Post by Portnumbay »

Hi masters..
I am confuse at the moment with time calculation... For example I have table 'order' with field : name and date...
In my search option (menu list), there will be like "3 months ago, 1 year ago, 3 years ago, etc".. whats the syntax in php to calculate the time ? so when i choose 3 months ago, and click search button, it will select data from table where are submitted 3 months ago from the current time... Anyone can explain ? Thanks alot...
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Sort data with specific time

Post by mikosiko »

Post Reply