0
SELECT * FROM `votes` WHERE `forserverid`='518' AND `date` ?????

The date columns contains a unix timestamp, how do I make it so it only shows rows where the unix timestamp in the date column is less than X time (3 hours in my case). i want to do this filter within the mysql query if possible.

Thanks :)

1 Answers1

0

Unix time stamp is in secods so 3 hs are 3 * 60 * 60 seconds.

The condition should be date < UNIX_TIMESTAMP(NOW()) - 3 * 60 * 60

Juan
  • 5,525
  • 2
  • 15
  • 26