implode() 函数适用于普通数组,但不适用于使用 mysql_fetch_array 创建的数组(我也尝试过 mysql_fetch_row)
你如何让他们工作?
上面定义:
$friends = mysql_query("SELECT * FROM friend
WHERE u1='$userinfo[username]' OR u2='$userinfo[username]' ");
再往下:
$friendsrow = mysql_fetch_array($friends);
$friendsrow = join(",",$friendsrow);
$friendnotes = mysql_query("SELECT nid,user,subject,message FROM friendnote WHERE user IN ($friendsrow) ORDER BY timestamp ASC LIMIT 0,5");
(如果您想知道,那是针对社区网站)