示例#1
0
 public function ajax_elevation_update_all()
 {
     $result = Database::getDB()->query("\r\n\t\t\tSELECT r_id, r_name, r_points\r\n\t\t\tFROM routes\r\n\t\t\tWHERE\r\n\t\t\t\tr_elevation IS NULL\r\n\t\t\tLIMIT 10\r\n\t\t") or die(Database::getDB()->error);
     $routes = array();
     while ($row = $result->fetch_assoc()) {
         $routes[] = new Route($row);
     }
     $result->close();
     $results = array();
     foreach ($routes as $route) {
         $result = $route->_updateElevationData();
         if (!$result) {
             $result = $route->_setElevationToChecked();
         }
         $results[] = $result;
     }
     RoutingEngine::returnAjaxForm(true, $results);
 }