Daron Posted August 26, 2012 Share Posted August 26, 2012 Hey i have something im trying work out, i have a tier of ranks, and each rank is earned by being online(well thats what i want) the way i was trying go about it is on my hourly cron have it set so those online go up a rank and those offline go down a rank, BUT i dont know how to properly run that query. i tried this $db->query("UPDATE users SET rank=rank+1 WHERE laston >= time()-15*60"); i think its because this "time()" but im not really sure how to pull this off ????:confused: Quote Link to comment Share on other sites More sharing options...
Seker Posted August 26, 2012 Share Posted August 26, 2012 $db->query("UPDATE users SET rank=rank+1 WHERE(laston >= (" . time() . "-(15*60)))"); Maybe? Not sure, though. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted August 26, 2012 Share Posted August 26, 2012 You could always substitute time() for UNIX_TIMESTAMP() Quote Link to comment Share on other sites More sharing options...
Daron Posted August 26, 2012 Author Share Posted August 26, 2012 ohhh ^_^ thanx Seker! it worked!!!!!! Thanx a lot 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.