<?php 
	class dataPenugasan extends mysql{
			
		function get_data_dosen($kolom,$a,$type){
			if($type == '') return trim ($this->sql_order_seek($sql,$kolom,$a));
			$sql = "select * from tbdosen";
			$this->query = $this->execute($sql,'');
			if ($type == 'jumlah') return $this->sql_order_count($sql);
		}
		
		function get_operator_single_by_id($kolom,$id){
			if($this->cek_result != "on"){
			$sql = "select * from tbdosen where Id='".$id."'";
			$this->result = $this->execute($sql,'order');
			$this->cek_result = "on";
			return trim($this->result[$kolom]);
			}
				else return trim($this->result[$kolom]);
		}

		function get_dosen_ttd($kolom,$id){
			if($this->cek_result != "on"){
			$sql = "select tb2.Nama, tb2.NIP, tb2.Id from tbttd tb1 inner join tbdosen tb2 on tb1.".$id." = tb2.Id";
			$this->result = $this->execute($sql,'order');
			$this->cek_result = "on";
			return trim($this->result[$kolom]);
			}
				else return trim($this->result[$kolom]);
		}

		function get_dosen_single_by_id($kolom,$id){
			if($this->cek_result != "on"){
			$sql = "select * from tbdosen where Id='".$id."'";
			$this->result = $this->execute($sql,'order');
			$this->cek_result = "on";
			return trim($this->result[$kolom]);
			}
				else return trim($this->result[$kolom]);
		}
				
		function edit_wadek($idWadek){
		    $sql = "update tbttd set wadek = '".$idWadek."'";
		    $this->query = $this-> execute($sql,''); 
		}
		
				
	}
?>