Allright Twey, I've finally gotten to a point in my process of learning PHP & MySQL that i can read through your chat script that you provided, and find the necessary step to achieve what I'm going for here. I did read it and i now have the basic idea of what i'm doing, but theres one thing i wanted to ask you.
Code:
mysql_query("select * from $usertable where logged=1 and DATE_SUB(NOW(),INTERVAL 30 SECOND) > lastseen;");
That query makes pretty much no sense to me, especially the (NOW(),INTERVAL 30 SECOND). I'm pretty sure this is the part where every thirty seconds it checks the user to see if they're still in the chatroom. But would you mind explaining this one query for me? And, what does DATE_SUB do?
Thanks.
Bookmarks