$cleanup_event = mysql_query('SELECT userid FROM ' . SQL_PREFIX . 'member WHERE last_ping < ' . $expire_time . ' AND is_online > 0');
if(mysql_num_rows($cleanup_event) > 0) {
while($row = mysql_fetch_assoc($cleanup_event))
$notify_buddies = $this->userEvent($row['userid'], $this->getBuddylist($row['userid']), 'status', array('status'=>0));
}运行结果:mysql_num_rows($cleanup_event) 为15
而$row = mysql_fetch_assoc($cleanup_event)=false
真奇了怪了大家遇到过这种情况吗?
while($row = mysql_fetch_assoc($cleanup_event)) //如果取出的数据为空 while是不会执行的
也没有看到 $row = mysql_fetch_assoc($cleanup_event)=false
的证据