<?php
include_once("server/class/GeoUtils.php");
include_once("server/lib/mod_dbm/package.dbm.php");

/**
 * Description of Delivery
 *
 * @author pc
 */
class EventsManager{

    private $dao;
            
    public function __construct() {
        $this->dao = new dbObject();
    }
    
    public function addEvent($deliveryId,$eventCode,$timestamp){
        
        $statement = $this->dao->connection->prepare("INSERT INTO delivery_events (delivery_id,event_code, event_timestamp) VALUES (?,?,?);");
        $statement->bind_param("ssi",$deliveryId,$eventCode,$timestamp);
        $statement->execute();
       
        return $statement->affected_rows;
    }
    
    
}
