AcidReignX
Programmer
I've tried just about every php/mysql combination out there in order to make this work, but even when it seems that it should work, it doesn't. It must be comparing strings or something, because I've tested the numbers, and the numbers themselves would have worked properly.
What I'm trying to do is create a "Who's Online" box for a forum. I've already created a timestamp record in my user table, and they're updated with NOW() whenever somebody navigates anywhere on the site.
I've tried to run this with many functions, and the most recently failed one is this:
Now... the numbers seem to come out right if it would just CALCULATE THEM properly. Whenever the fifth to last digit is changed, it says everybody is online. I can't seem to find a combination that works. I've used NOW() - ###, but that does the same thing.
I'm reeeaaallllly getting frustrated with this thing. Could somebody please help me with this?
What I'm trying to do is create a "Who's Online" box for a forum. I've already created a timestamp record in my user table, and they're updated with NOW() whenever somebody navigates anywhere on the site.
I've tried to run this with many functions, and the most recently failed one is this:
Code:
$query = "SELECT recorda, recordb FROM usertable WHERE timestamp >= " . (date("YmdHi") - 10) . date("s");
$result = mysql_query($query);
...
Now... the numbers seem to come out right if it would just CALCULATE THEM properly. Whenever the fifth to last digit is changed, it says everybody is online. I can't seem to find a combination that works. I've used NOW() - ###, but that does the same thing.
I'm reeeaaallllly getting frustrated with this thing. Could somebody please help me with this?