--- a/include/db/route-dao.inc.php +++ b/include/db/route-dao.inc.php @@ -13,6 +13,7 @@ } return $query->fetch(PDO::FETCH_ASSOC); } + function getRoutes() { global $conn; @@ -200,7 +201,7 @@ $query = $conn->prepare($query); $query->bindParam(":service_period", $service_period); $query->bindParam(":distance", $distance); - $query->bindParam(":limit", $limit); + if ($limit != "") $query->bindParam(":limit", $limit); $query->execute(); if (!$query) { databaseError($conn->errorInfo());