php - Correct way to fetch posts which are posted 3 days ago? -


my data has column named "date" includes post dates in unix date format. using query fetch posts posted 3 days ago

$result=mysql_query("select * track   from_unixtime(date,'%y-%m-%d %h:%m:%s') > now() - interval 3 day , from_unixtime(date,'%y-%m-%d %h:%m:%s') < now() - interval 2 day"); 

this works, however, selects posts date in range of -48 hours , -72 hours. want fetch posts day names. mean, example if post added 40 hours ago, not theorically 48 hours (2 days) if @ day name, 2 days ago. how can fetch posts ?

select * track   from_unixtime(date,'%y-%m-%d') = curdate() - interval 2 day 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -