mysql_query( "DELETE FROM online_now WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(start_time) > $to_secs and member_id < 1") ;
mysql_query( "DELETE FROM online_now WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(start_time) > $to_secs_mem ") ;
mysql_query( "update online_now set status=0 WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(start_time) > $to_secs");
These are the queries that came standard. These 3 queries are in my connections php file which is included on every page. So I imagine that means that every page that is loaded, the online now status is checked or modified, etc.
I'm having trouble figuring out what the heck these 3 queries are doing, or if there is a better way to do this without executing 3 queries. Keep in mind that since this file is included, this adds 3 queries to every page on the site, some if which already have tons of queries.
Can someone let me know if this code looks ok or not? 🙂
Thanks in advance,
Chris