I have a cron task that logs a value in my database every 15 minutes so my database rows look something like this:
1, 100, 1311312600
1, 100, 1311313200
1, 90, 1311313800
etc.
The third field is a time() value.
Lets say the current time is 1:00PM on 07/22/2011. I want to see all of yesterdays values, so I need the following times for my SQL query.
07/22/2011 00:00:00
07/21/2011 00:00:00
How do I generate those values from the current time? Keep getting tripped up!