techker Posted December 21, 2011 Share Posted December 21, 2011 Hey guys i need to make a query that checks entries in the last 24 hours the 48 then 72... i got this but it show in 48 and 72 and month.. $x12 = 'SELECT COUNT(*) FROM Sortie WHERE `Date`> NOW() - INTERVAL 48 HOUR'; $result12 = mysql_query($x12) or die(mysql_error()); $total_rows12 = mysql_fetch_row($result12); my goal is to get in the last 12h..the skips to 48h if it stay without editing and so on.. Link to comment https://forums.phpfreaks.com/topic/253578-12-24-48h/ Share on other sites More sharing options...
dzelenika Posted December 21, 2011 Share Posted December 21, 2011 SELECT COUNT(*) FROM Sortie WHERE `Date`>BETWEEN NOW() - INTERVAL 96 hour AND NOW() - INTERVAL 48 hour Link to comment https://forums.phpfreaks.com/topic/253578-12-24-48h/#findComment-1299972 Share on other sites More sharing options...
techker Posted December 21, 2011 Author Share Posted December 21, 2011 wow..lol cool i will try it out tonight.thx! Link to comment https://forums.phpfreaks.com/topic/253578-12-24-48h/#findComment-1300041 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.