<?php
class AppWaktuKuliah extends Database {

   protected $mSqlFile= 'module/waktu_kuliah/business/appwaktukuliah.sql.php';
   
   function __construct($connectionNumber=0) {
      parent::__construct($connectionNumber);
            
   }
   
   function DoAddWaktuKuliah($wktNama,$wktKeterangan){
   		$maxId = $this->Open($this->mSqlQueries['get_max_id_waktu_kuliah'], array());
      	$result = $this->Execute($this->mSqlQueries['do_add_waktu_kuliah'], array(($maxId[0]['ID']+1), $wktNama,$wktKeterangan));
      	//print($this->GetLastError());
      	return $result;
   }
   
   function DoUpdateWaktuKuliah($wktId,$wktNama, $wktKeterangan){
   		$result = $this->Execute($this->mSqlQueries['do_update_waktu_kuliah'], array($wktNama, $wktKeterangan, $wktId));
      	//print($this->GetLastError());
      	return $result; 
   }
   
   function DoDeleteWaktuKuliahById($wktId) {
      $result=$this->Execute($this->mSqlQueries['do_delete_waktu_kuliah_by_id'], array($wktId));
      return $result;
   }
   
   function DoDeleteWaktuKuliahByArrayId($arrWktId) {
      $wktId = implode("', '", $arrWktId);
      $result=$this->Execute($this->mSqlQueries['do_delete_waktu_kuliah_by_array_id'], array($wktId));
      return $result;
   }   
}
?>