<?php
include('../includes/validador.php');
include('../conexiones/conex.php');

$curso = $_POST['id'];
$idalum = $_POST['idAlum'];

$tabla = "";

	$sqlPagos = "SELECT * FROM pagos_matriculas PMT INNER JOIN matricula MT ON PMT.matricula_INT = MT.Matricula_id WHERE MT.Curso_id = '$curso' AND MT.Persona_id = '$idalum'";
	$queryPagos = mysqli_query($con, $sqlPagos);
	$total = mysqli_num_rows($queryPagos);

	if($total > 0){
		while($row = mysqli_fetch_assoc($queryPagos)){
			$datos["data"][] = $row;
		}
	}else{
		$datos["data"]["vacio"] = "";
	}
	echo json_encode($datos);		
	$con->close();
?>