バス停番号 | 停留所名 | "); $sql1 = "select busservice_name, backcolor from nservice_name_tbl where direction = 0 and r_id=".$_GET['r_id']; $res1 = mysql_query($sql1); if(!$res1){ unset($con,$select_db,$sql,$res,$sql1,$res1); die(); } $row1 = mysql_fetch_array($res); for($i = 1;$row1 = mysql_fetch_array($res1);$i++){ print("".$row1['busservice_name']." | "); } print("|
---|---|---|---|
".$row2['busstop_id']." | ".$row2['bus_name']." | ");
$sql3 = "select backcolor, ntime_tbl.time from ntime_tbl left join nservice_name_tbl on nservice_name_tbl.r_id = ntime_tbl.r_id and nservice_name_tbl.busservice_id = ntime_tbl.busservice_id where busstop_id =".$i." and direction = 0 and ntime_tbl.r_id=".$_GET['r_id']." order by busstop_id,nservice_name_tbl.busservice_id asc";
$res3 = mysql_query($sql3);
for($j = 1;$row3 = mysql_fetch_array($res3);$j++){
if($row3['backcolor'][0] == '#'){
print("".$row3['time']." | "); }else{ print("".$row3['time']." | "); } } print("