jwk811 Posted September 2, 2009 Share Posted September 2, 2009 function delete_offline_users() { $time = time(); // usuniecie uzytkownikow ktorzy wyszli z chata $result = mysql_query("select * from ".LTChat_Main_prefix."who_is_online where online = '1' and action_time < {$time}-".get_ConfVar("LTChart_offline_user_after")." and chat_id = '".LTChat_Main_CHAT_ID."'") or debug(mysql_error(), "LTChatDataKeeper", __LINE__); while ($row = mysql_fetch_object($result)) { mysql_query("delete from ".LTChat_Main_prefix."who_is_online where who_id = '{$row->who_id}' and room = '{$row->room}' and chat_id = '".LTChat_Main_CHAT_ID."'") or debug(mysql_error(), "LTChatDataKeeper", __LINE__); mysql_query("insert into ".LTChat_Main_prefix."who_is_online(action_time, users_id, room, online, chat_id) values ('{$time}', '{$row->users_id}','{$row->room}','0','".LTChat_Main_CHAT_ID."')") or debug(mysql_error(), "LTChatDataKeeper", __LINE__); } } Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 2, 2009 Author Share Posted September 2, 2009 i realize thats a lot to translate and the code thing made it weird. well how could i? heres the code again: function delete_offline_users() { $time = time(); // usuniecie uzytkownikow ktorzy wyszli z chata $result = mysql_query("select * from ".LTChat_Main_prefix."who_is_online where online = '1' and action_time < {$time}-".get_ConfVar("LTChart_offline_user_after")." and chat_id = '".LTChat_Main_CHAT_ID."'") or debug(mysql_error(), "LTChatDataKeeper", __LINE__); while ($row = mysql_fetch_object($result)) { mysql_query("delete from ".LTChat_Main_prefix."who_is_online where who_id = '{$row->who_id}' and room = '{$row->room}' and chat_id = '".LTChat_Main_CHAT_ID."'") or debug(mysql_error(), "LTChatDataKeeper", __LINE__); mysql_query("insert into ".LTChat_Main_prefix."who_is_online(action_time, users_id, room, online, chat_id) values ('{$time}', '{$row->users_id}','{$row->room}','0','".LTChat_Main_CHAT_ID."')") or debug(mysql_error(), "LTChatDataKeeper", __LINE__); } } Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 2, 2009 Share Posted September 2, 2009 That code IS PHP - what exactly are you wanting? Quote Link to comment Share on other sites More sharing options...
jwk811 Posted September 2, 2009 Author Share Posted September 2, 2009 sry im mentally challenged Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.