<?phpinclude 'db.php';$old_msg_id = $_GET['old_msg_id']; $result = mysql_query("SELECt id FROM chatpoll ORDER BY id DESC LIMIT 1");while($row = mysql_fetch_array($result)){ $last_msg_id = $row['id']; }while($last_msg_id <= $old_msg_id){ usleep(1000); clearstatcache(); $result = mysql_query("SELECt id FROM chatpoll ORDER BY id DESC LIMIT 1"); while($row = mysql_fetch_array($result)) { $last_msg_id = $row['id']; }}$response = array();$response['msg'] = 'new';$response['old_msg_id'] = $last_msg_id;echo json_enpre($response);?>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)