<?php
class PracCarreraObe extends Conexion {
    public function ConsultarFiltro($practicadbk) {
        $conectar = parent::conectar();
        parent::set_names();
        $sql1 = "
                SELECT * FROM prac_general 
                WHERE practicadbk = ?";
        $sql1 = $conectar->prepare($sql1);
        $sql1->bindValue(1, $practicadbk);
        $sql1->execute();
        $datos = $sql1->fetchAll();
        foreach ($datos as $row) {
            $carreradbk = $row["carrera"];
        }
        $sql = "
                SELECT * FROM prac_carreraobe, prac_objetivoe 
                WHERE objetivoedbk = objetivo_especifico
                AND carrera = ?";
        $sql = $conectar->prepare($sql);
        $sql->bindValue(1, $carreradbk);
        $sql->execute();
        return $resultado = $sql->fetchAll();
    }
    public function ConsultarFiltroResultados($practicadbk) {
        $conectar = parent::conectar();
        parent::set_names();
        $sql1 = "
                SELECT * FROM prac_general 
                WHERE practicadbk = ?";
        $sql1 = $conectar->prepare($sql1);
        $sql1->bindValue(1, $practicadbk);
        $sql1->execute();
        $datos = $sql1->fetchAll();
        foreach ($datos as $row) {
            $carreradbk = $row["carrera"];
        }
        $sql = "
                SELECT * FROM prac_carreracom, prac_competencia
                WHERE competencia = competenciadbk
                AND carrera = ?";
        $sql = $conectar->prepare($sql);
        $sql->bindValue(1, $carreradbk);
        $sql->execute();
        return $resultado = $sql->fetchAll();
    }
}
?>