<?php
class AppProgramStudiToUm extends Database {
   protected $mSqlFile= 'module/program_studi/business/appprogramstuditoum.sql.php';
   
   function __construct($connectionNumber=4) {
      parent::__construct($connectionNumber);
      
   }  
   function GetDataUm($kodeProdi){
      $result=$this->Open($this->mSqlQueries['get_data_um'],array($kodeProdi));
      return $result;
   }
   function DoAddProgramStudi($kodeProdi,$kodePil,$kodeFak,$namaProdi,$spma1,$spma2,$spma3,$spma4,$spmapbs,$spmapbupd,$jenjangAkademik){
     # print($jenjangAkademik);   
      $result=$this->Execute($this->mSqlQueries['do_add_program_studi'],array($kodeProdi,$kodePil,$kodeFak,$namaProdi,$spma1,$spma2,$spma3,$spma4,$spmapbs,$spmapbupd,$jenjangAkademik));
#print($this->GetLastError());exit;
      return $result;
   }
   
   function DoUpdateProgramStudi($kodeProdi,$kodePil,$kodeFak,$namaProdi,$spma1,$spma2,$spma3,$spma4,$spmapbs,$spmapbupd,$jenjangAkademik,$oldId){
      $result=$this->Execute($this->mSqlQueries['do_update_program_studi'],array($kodeProdi,$kodePil,$kodeFak,$namaProdi,$spma1,$spma2,$spma3,$spma4,$spmapbs,$spmapbupd,$jenjangAkademik,$oldId));   
      return $result;
   }
   
   function DoDeleteProgramStudiById($kodeProdi){
      $result=$this->Execute($this->mSqlQueries['do_delete_program_studi_by_id'],array($kodeProdi));
      return $result;
   }
   
   function DoDeleteProgramStudiByArrayId($arrKodeProdi){
      $kodeProdi = implode("', '", $arrKodeProdi);
      $result=$this->Execute($this->mSqlQueries['do_delete_program_studi_by_array_id'],array($kodeProdi));
      return $result;
   }

}
?>
