Commit 3e70fda0 authored by winddramon's avatar winddramon

bug fix

parent c94a42f0
......@@ -22,6 +22,7 @@ function init_messages($mode){
function message_check_new($username)
{
global $cuser,$db,$gtablepre;
$num = 0;
if($cuser){
//考虑到devtools.php也得先载入common.inc.php,从而如果没有建表就会直接出错,必须在这里就做判断是否存在message表
//而既然做了判断为什么不直接建表呢?
......@@ -33,9 +34,9 @@ function message_check_new($username)
create_messages_db();
}
}
}
$result = $db->query("SELECT mid FROM {$gtablepre}messages WHERE receiver='$username' AND rd=0");
$num = $db->num_rows($result);
}
return $num;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment