--- a/myway/myway_timeliness_reconcile.php +++ b/myway/myway_timeliness_reconcile.php @@ -17,14 +17,18 @@ include ('../include/common.inc.php'); auth(); foreach ($_REQUEST as $key => $value) { - if (strstr($key, "route") && !strstr($value, "Select")) { + if (strstr($key, "route") && !strstr($value, "Select")) { $myway_route = str_replace("route", "", $key); - $route_id = $value; - $query = "update myway_routes set route_id = :route_id where myway_route = :myway_route"; + $vparts = explode("-",$value); + $route_short_name = $vparts[0]; + $trip_headsign = $vparts[1]; + $query = "update myway_routes set route_short_name = :route_short_name, trip_headsign = :trip_headsign where myway_route = :myway_route"; debug($query, "database"); $query = $conn->prepare($query); $query->bindParam(":myway_route", $myway_route, PDO::PARAM_STR, 5); - $query->bindParam(":route_id", $route_id, PDO::PARAM_STR, 42); + + $query->bindParam(":route_short_name", $route_short_name, PDO::PARAM_STR, 42); + $query->bindParam(":trip_headsign", $trip_headsign, PDO::PARAM_STR, 42); $query->execute(); die(print_r($conn->errorInfo(), true)); } @@ -100,6 +104,46 @@ '; echo '