angst
08-16-2005, 06:49 PM
this was posted in ASP, but i've mosted it here.
first post:
Hello,
I'm trying to show what users are currently logged in on my site. what I've done is update a timestamp everytime they hit a page. what i want to do is select users where the current time Now() is within 15 minutes of the timestamp, to see if any users are on.
but I'm not sure how to do this.
any ideas? examples would be grate, I haven't done any asp in a long time.
thanks in advance for you time!
-Ken
second post:
ok, i've tried this,
SQL = "Select user from accounts WHERE DateDiff(n, Now(), date) < 15 ORDER BY user"
but i'm getting an error:
ADODB.Recordset.1 error '80004005'
SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near '(n, Now(), date) < 15 ORDER BY user' at line 1
/admin/date.asp, line 6
also i'm using MySQL as the data base.
any ideas, anyone??
thanks again!
-Ken
first post:
Hello,
I'm trying to show what users are currently logged in on my site. what I've done is update a timestamp everytime they hit a page. what i want to do is select users where the current time Now() is within 15 minutes of the timestamp, to see if any users are on.
but I'm not sure how to do this.
any ideas? examples would be grate, I haven't done any asp in a long time.
thanks in advance for you time!
-Ken
second post:
ok, i've tried this,
SQL = "Select user from accounts WHERE DateDiff(n, Now(), date) < 15 ORDER BY user"
but i'm getting an error:
ADODB.Recordset.1 error '80004005'
SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near '(n, Now(), date) < 15 ORDER BY user' at line 1
/admin/date.asp, line 6
also i'm using MySQL as the data base.
any ideas, anyone??
thanks again!
-Ken