--- a/include/db/servicealert-dao.inc.php +++ b/include/db/servicealert-dao.inc.php @@ -1,10 +1,10 @@ <?php -function getServiceOverride() { +function getServiceOverride($date="") { global $conn; $query = "Select * from calendar_dates where date = :date and exception_type = '1' LIMIT 1"; debug($query,"database"); $query = $conn->prepare($query); // Create a prepared statement - $query->bindParam(":date", date("Ymd")); + $query->bindParam(":date", date("Ymd",($date != "" ? $date : time()))); $query->execute(); if (!$query) { databaseError($conn->errorInfo());