[SOLVED] strttome subracting seconds
Posted: Fri Mar 11, 2005 4:50 pm
I have this query:
but it's returning a bunch of rows when there really should only be 2 users who are within the 10 second range...can strtotime subract seconds?
Edit:
major brain fart on my part...I've revised my query to this:
but now I"m getting an error in my sql syntax ?? :S
Edit2: duh...another brain fart...I'm all good now...pretend this was never posted.
Burr
Code: Select all
$getparts = mysql_query("select * from chatusers where room = '".mysql_escape_string($_GET['room'])."' and lasttime > ".strtotime("-10 seconds"));Edit:
major brain fart on my part...I've revised my query to this:
Code: Select all
$partsqu = "select * from chatusers where room = '".mysql_escape_string($_GET['room'])."' and lasttime > '".date("Y-m-d H:i:s", strtotime("-10 seconds")."'");Edit2: duh...another brain fart...I'm all good now...pretend this was never posted.
Burr