or download this
$originsql = qq{ SELECT a.stop_reference, b.service_id, distance(Point
+FromText('POINT($origin)', 27700),east_north), c.route_number FROM bu
+s_stops a, service b, routes c WHERE distance(PointFromText('POINT($o
+rigin)', 27700),east_north) < 200 AND a.stop_reference = b.stop_refer
+ence AND b.service_id = c.service_id ORDER BY b.service_id, distance(
+PointFromText('POINT($origin)', 27700),east_north)};
$sth = $dbh->prepare( $originsql );
...
$last_orig_service_id = $origin_service;
}
}
or download this
$destsql = qq{ SELECT a.stop_reference, b.service_id, distance(PointFr
+omText('POINT($dest)', 27700),east_north), c.route_number FROM bus_st
+ops a, service b, routes c WHERE distance(PointFromText('POINT($dest)
+', 27700),east_north) < 200 AND a.stop_reference = b.stop_reference A
+ND b.service_id = c.service_id ORDER BY b.service_id, distance(PointF
+romText('POINT($dest)', 27700),east_north)};
$sth = $dbh->prepare( $destsql );
...
$last_dest_service_id = $destination_service;
}
}