Jump to content

Previous Date


steveangelis

Recommended Posts

I have a database with a massive group of entries in it, all with dates.  What I am trying to do is get all of the dates, and this script will be run once a day, that are a year old or older.  Again since this will be run consistantly the data coming out will be ever growing.  My current script is this but it is not working:

 

SELECT * FROM user WHERE lastvisit > (date("U")-315369000)

 

Now that number, 315369000, is how many seconds i has been since a year ago but it is not working.  Does anyone know why and/or how I can get it to work properly?

Link to comment
https://forums.phpfreaks.com/topic/173173-previous-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.