<?php

class Canton extends Conexion {

    public function Consultar($prov_id) {
        $conectar = parent::conectar();
        parent::set_names();
        $sql = "SELECT * FROM canton WHERE can_provincia = ?";
        $sql = $conectar->prepare($sql);
        $sql->bindValue(1, $prov_id);
        $sql->execute();
        return $resultado = $sql->fetchAll();
    }

    public function ConsultarCantones() {
        $conectar = parent::conectar();
        parent::set_names();
        $sql = "SELECT * FROM canton";
        $sql = $conectar->prepare($sql);
        $sql->execute();
        return $resultado = $sql->fetchAll();
    }

}

?>
