include 'inc.php';
$varVeh=$_POST['Veh_num'];
$sql_course="select course_num from hc_course";
$results_course=mysql_query($sql_course);
$sql_vehName="select Veh_name from hc_vehicle_type where Veh_num=$varVeh ";
$result_vehName = mysql_query($sql_vehName);
$vehName=mysql_fetch_assoc($result_vehName);
echo "<table><tr><th>Best Scores for".$vehName['Veh_name']."</th> </tr></table>";
while($rc = mysql_fetch_array($results_course)){
$sql_HiScores = "SELECT c.course_name as course, e.distance as distance, e.score as score, e.time as time, e.user as User from hc_entries e left join hc_course c on e.course=c.course_num WHERE c.course_num=".$rc['course_num']." and e.vehicle=$varVeh ORDER BY course, score DESC Limit 3 ";
$result_HiScores = mysql_query($sql_HiScores);
?>
<table border='1'>
<tr>
<th>Course</th>
<th>Score</th>
<th>Distance</th>
<th>Player</th>
<th>Time</th>
</tr>
<?php
while($row = mysql_fetch_array($result_HiScores))
{
echo "<tr>";
echo "<td>" .$row['course'] . "</td>";
echo "<td>" .$row['score'] . "</td>";
echo "<td>" .$row['distance'] . "</td>";
echo "<td>" .$row['User'] . "</td>";
echo "</tr>";
}
echo "</table>";
}
?>
目前这是在页面下方创建表格。我想知道是否有办法让两张桌子并排:
表 1 表 2
表 3 表 4
表 5 表 6
或者如果它们适合页面,甚至可能是 3 个。
表 1 表 2 表 3
表 4 表 5 表 6