$ Select = "select row from user_message order by row DESC ";
$ Result = mysql_query ($ select) or die ("false FGG ");
$ Rowlist = mysql_fetch_array ($ result) or die ("false ");
$ Max_row = $ rowlist ["row"];
If ($ max_row> $ max_row_length ){
$ Delete_row = $ max_row-$ max_row_length + 1;
// Echo $ max_row ."
". $ Delete_row;
$ Select = "select row from user_message where row <". $ delete_row;
$ Result = mysql_query ($ select) or die ("false ");
While ($ row = mysql_fetch_array ($ result ))
{
$ SQL = "delete from user_message where row <". $ delete_row;
Mysql_query ($ SQL) or die ("del false1 ");
}
$ Left = $ delete_row;
}
Else {$ left = 1;
}
For ($ I = $ max_row; $ I >=$ left; $ I --)
{
$ SQL = "SELECT message, userid, object, status, color, action1, time1 FROM user_message where row = '$ I '";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
$ Row = mysql_fetch_array ($ result );
$ Time1 = $ row ["time1"];
$ Usert1 = $ row ["userid"];
$ Objectt1 = $ row ["object"];
$ SQL = "select id from chat_user_list where userid = '$ usert1 '";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
$ Rowt1 = mysql_fetch_array ($ result );
$ Usert5 = $ rowt1 ["id"];
$ SQL = "select id from chat_user_list where userid = '$ object1 '";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
If ($ rowt2 = mysql_fetch_array ($ result ))
$ Bojectt5 = $ rowt2 ["id"];
Else $ bojectt5 = "everyone ";
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.