<?php
require_once('Database.php');
class Alert extends Database{
    public $Id;
    public $Destination;
    public $Url;
    public $Description;

  public function InsertRecord(){
    $Query = "INSERT INTO  Alert (Destination, Url, Description)
                            VALUES($this->Destination, '$this->Url', '$this->Description')";
    return $this->ExecuteQuery($Query);
  }

    public function GetRecordsByDestination(){
        $Query = "SELECT *  FROM Alert WHERE Destination = $this->Destination ORDER BY DateTime DESC";
        return $this->ExecuteReader($Query);
    }

}