当我执行此查询时,代码在第'行崩溃$ row2 = mysql_fetch_array($ result2)' 有人可以帮我告诉我这里有什么问题。
$query2 = " SELECT time, MAX(id) FROM i_friend WHERE (user_id=$uid AND friend_id=$fid) OR (user_id=$fid AND friend_id=$uid) ";
$result2 = mysql_query($query2);
if($result2)
{
if (mysql_num_rows($result2) > 0) {
$row2 = mysql_fetch_array($result2)
detail["last_chat_time"] = $row2[$id];
} else {
$detail["last_chat_time"] = "";
}
}
答案 0 :(得分:0)
纠正这两行
$row2 = mysql_fetch_array($result2);
$detail["last_chat_time"] = $row2[$id];