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.. Quote Link to comment 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 Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.