Trying to query a list of online users.
Posted: Sat Mar 19, 2011 11:46 pm
Hello,
I'm creating a game, and I want to show a list of players who have done something to update the timestamp in the past 3 minutes. On every button they click, a time stamp is updated.
Now I want to echo out the page, but my query seems to be wrong. I'm not sure how often it updates, or what it's doing, but it doesn't seem to be working properly.
Can anyone give me any advice on how to correct this?
Thanks,
Alexi
I'm creating a game, and I want to show a list of players who have done something to update the timestamp in the past 3 minutes. On every button they click, a time stamp is updated.
Now I want to echo out the page, but my query seems to be wrong. I'm not sure how often it updates, or what it's doing, but it doesn't seem to be working properly.
Code: Select all
$queryu="SELECT * FROM users WHERE lastonline >= DATE_SUB(CURDATE(), INTERVAL 3 MINUTE)";
Can anyone give me any advice on how to correct this?
Thanks,
Alexi