Example #1
0
 public function criar(Turma $e)
 {
     $sql = 'INSERT INTO turmas (curso_id, nivel_id, turno_id) VALUES (:curso_id, :nivel_id, :turno_id)';
     $statement = $this->_db->prepare($sql);
     $statement->bindParam(':curso_id', $e->getCurso()->getId(), PDO::PARAM_INT);
     $statement->bindParam(':nivel_id', $e->getNivel()->getId(), PDO::PARAM_INT);
     $statement->bindParam(':turno_id', $e->getTurno()->getId(), PDO::PARAM_INT);
     $ret = $statement->execute();
 }