DeanWhitehouse Posted December 27, 2008 Share Posted December 27, 2008 <?php $timenow = date("Y-m-d h-m-s",strtotime("- 5 minutes")); $select = mysql_query("SELECT last_active FROM user_details WHERE last_active >= '$timenow'") or die(mysql_error()); echo mysql_num_rows($select); ?> This doesn't work on my page (to display amount of users online in the last five minutes) but does work on my login page, but none of the main ones. It did work and i have changed nothing, is there anything wrong with the code Quote Link to comment https://forums.phpfreaks.com/topic/138506-solved-code-stopped-working/ Share on other sites More sharing options...
Flames Posted December 27, 2008 Share Posted December 27, 2008 are you connected to the DB on the files that dont work? Quote Link to comment https://forums.phpfreaks.com/topic/138506-solved-code-stopped-working/#findComment-724209 Share on other sites More sharing options...
DeanWhitehouse Posted December 27, 2008 Author Share Posted December 27, 2008 yes, no errors nothing . just stopped working the date is stored like this 2008-12-22 10:50:53 Quote Link to comment https://forums.phpfreaks.com/topic/138506-solved-code-stopped-working/#findComment-724212 Share on other sites More sharing options...
DeanWhitehouse Posted December 27, 2008 Author Share Posted December 27, 2008 If you want to see this is the site address http://gangster.game-design.djw-designs.com/login.php Quote Link to comment https://forums.phpfreaks.com/topic/138506-solved-code-stopped-working/#findComment-724217 Share on other sites More sharing options...
DeanWhitehouse Posted December 27, 2008 Author Share Posted December 27, 2008 Solved, we have our time set to GMT while the server is different. Quote Link to comment https://forums.phpfreaks.com/topic/138506-solved-code-stopped-working/#findComment-724232 Share on other sites More sharing options...
trochia Posted December 27, 2008 Share Posted December 27, 2008 start> 101 . Stop LTC{function} Quote Link to comment https://forums.phpfreaks.com/topic/138506-solved-code-stopped-working/#findComment-724333 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.