$connect_status = "SELECT connected_to_id FROM tbl_connect WHERE user_id =
{$_SESSION['user_id']}";
$exec_connstatus_query = mysql_query($connect_status, $db_connect);
while($check_status = mysql_fetch_array($exec_connstatus_query))
{
if ($check_status['connected_to_id'] == $profileid)
{
echo "{$check_status['connected_to_id']}";
}
else
{
echo "fail";
}
}
这段代码困扰了我 3 个小时。这里的问题是即使这种情况:
if ($check_status['connected_to_id'] == $profileid)
else
返回 false,当语句执行时我看不到“失败” 。有任何想法吗?