在这个脚本中,当某个行记录与浏览器地址栏中的名称匹配时,我基本上想从 mysql 表中回显数据。但由于某种原因,没有回显数据。我的while循环不起作用的任何原因?
$users = $_GET['username'];
$other_friend_query = mysql_query("SELECT * FROM friend WHERE RelatingUser='$users'");
$other_friend_assoc = mysql_fetch_assoc($other_friend_query);
while ($other_friend_assoc = mysql_fetch_assoc($other_friend_query)) {
$friend_related = $other_friend_assoc['RelatedUser'];
echo $friend_related;
}