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?