<?php
class bancoMidias extends midia{
    
    private $query;
    private $midia;
    
    function getQuery() {
        return $this->query;
    }

    function getMidia() {
        return $this->midia;
    }

    function setQuery($query) {
        $this->query = $query;
    }

    function setMidia($midia) {
        $this->midia = $midia;
    }

    public function listarMidias(){
        $select = "SELECT * FROM midias ORDER BY nome ASC";
        $query = mysql_query($select);
        return $this->query = $query;
    }
    
    public function listarMidia($idmidia){
        $select = "SELECT * FROM midias WHERE idmidia = ".$idmidia."";
        $query = mysql_query($select);
        return $this->query = $query;
    }
}