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__); } } Link to comment https://forums.phpfreaks.com/topic/172895-solved-translate-into-php/ 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__); } } Link to comment https://forums.phpfreaks.com/topic/172895-solved-translate-into-php/#findComment-911224 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? Link to comment https://forums.phpfreaks.com/topic/172895-solved-translate-into-php/#findComment-911227 Share on other sites More sharing options...
jwk811 Posted September 2, 2009 Author Share Posted September 2, 2009 sry im mentally challenged Link to comment https://forums.phpfreaks.com/topic/172895-solved-translate-into-php/#findComment-911230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.