Show two directions and stops on routes/trips KML
[busui.git] / include / db / trip-dao.inc.php
blob:a/include/db/trip-dao.inc.php -> blob:b/include/db/trip-dao.inc.php
--- a/include/db/trip-dao.inc.php
+++ b/include/db/trip-dao.inc.php
@@ -35,7 +35,7 @@
 }
 function getTripStops($tripID) {
     global $conn;
-    $query = "SELECT stop_id, stop_name, ST_AsKML(position) as positionkml,
+    $query = "SELECT stops.stop_id, stop_name, ST_AsKML(position) as positionkml,
 	stop_sequence, trips.trip_id
 FROM stop_times
 join trips on trips.trip_id = stop_times.trip_id
@@ -49,7 +49,7 @@
         databaseError($conn->errorInfo());
         return Array();
     }
-    return $query->fetchColumn(0);
+    return $query->fetchAll();
 }
 function getTripShape($tripID) {
     // todo, use shapes table if shape_id specified
@@ -203,6 +203,3 @@
     }
     return $query->fetchAll();
 }
-
-
-?>