Active User Tracking, PHP Sessions

Posted by Nik on Stack Overflow See other posts from Stack Overflow or by Nik
Published on 2010-06-13T13:31:43Z Indexed on 2010/06/13 13:42 UTC
Read the original article Hit count: 313

Filed under:
|
|
|

Alright, I'm trying to work on a function for active user counting in an AJAX based application. I want to express the below SQL Query in correct syntax but I'm not sure how to write it. The desired SQL Query is below:

SELECT count(*)
FROM active WHERE timestamp > time() - 1800
     AND nick=(a string that doesn't contain [AFK])

Now, I do understand that time() - 1800 can be assigned to a variable, but how is timestamp > variable and nick that doesn't contain a string written in SQL?

© Stack Overflow or respective owner

Related posts about sql

Related posts about php5