izbryte Posted August 22, 2009 Share Posted August 22, 2009 I have this: mysql_result(mysql_query("SELECT COUNT(*) as Num FROM jobs WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)"),0); How do I get 26 hours instead of 1 day (24 hours)? Link to comment https://forums.phpfreaks.com/topic/171372-interval-help-simple/ Share on other sites More sharing options...
izbryte Posted August 22, 2009 Author Share Posted August 22, 2009 BTW... I tried: mysql_result(mysql_query("SELECT COUNT(*) as Num FROM jobs WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL '1 2' DAY_HOUR)"),0); but it didn't work. Also, I just noticed i posted this in the wrong forum... sorry. I don't know how to move it. Link to comment https://forums.phpfreaks.com/topic/171372-interval-help-simple/#findComment-903759 Share on other sites More sharing options...
Daniel0 Posted August 22, 2009 Share Posted August 22, 2009 SELECT COUNT(*) AS Num FROM jobs WHERE DATE >= NOW() - INTERVAL 26 HOUR; Link to comment https://forums.phpfreaks.com/topic/171372-interval-help-simple/#findComment-903831 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.