<?php
session_start();
header('Access-Control-Allow-Origin: *');
include "../../inc/config.php";

$json_response = array();

$data = $db->fetch_custom("select kurikulum.*,mat_kurikulum.*,mat_kurikulum.id as id_mat, jurusan.kode_jurusan,id_sms,id_jenj_didik from kurikulum 
inner join jurusan on kurikulum.kode_jurusan=jurusan.kode_jurusan 
inner join mat_kurikulum on kurikulum.id=mat_kurikulum.id_kurikulum where jurusan.kode_jurusan='".$_POST['jurusan']."' and kurikulum.id='".$_POST['id_kur']."' and mat_kurikulum.status_error!=1 ");
if ($data->rowCount()>0) {
   $json_response['jumlah'] = $data->rowCount();
} else {
  $json_response['jumlah'] = 0;
}

echo json_encode($json_response);

?>
