我希望 while 循环根据匹配的“id”列值输出。
$query = "SELECT s.id,s.last,s.first,s.course1,s.course2,s.course3
,e.id,e.last,e.first,e.course1,e.course2,e.course3
FROM $startsem1 s
JOIN $endsem1 e on s.id = e.id";
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
print_r($row); echo "<br><br>";
}