Example #1
0
 public static function saveSchedule($tournament, Schedule $schedule)
 {
     $req = DataBase::getInstance()->prepare('INSERT INTO tournament_schedule (tournament, start, stop) VALUES (:id, :start, :stop)');
     $req->bindvalue('id', $tournament, PDO::PARAM_INT);
     $req->bindvalue('start', $schedule->getStart(), PDO::PARAM_INT);
     $req->bindvalue('stop', $schedule->getEnd(), PDO::PARAM_INT);
     $req->execute();
     $req->closeCursor();
 }