<?php
	require "../commonincludefiles.php";
	$arr = array();
	
	if($_REQUEST['action'] == "Eduqul"){
		$SQL_SUBJECT = "SELECT DISTINCT employee_eduqualification 
						FROM sms_employeemaster 
						where employee_eduqualification!=''
						order by employee_eduqualification ASC ";
		$rs = dbQuery($SQL_SUBJECT);
		$total=dbRows($rs);
		$SubjectData = array("count" => $total, "data" => array());
		$i=0;
		if(dbRows($rs) > 0){
			while($row = dbArray($rs)){
				$temparray["employee_eduqualification"]  = $row["employee_eduqualification"];
				$SubjectData["data"][$i] = $temparray;   
				$i++;
			}
		}
		echo json_encode($SubjectData);
	}
	else if($_REQUEST['action'] == "Edusub"){
		$SQL_SUBJECT = "SELECT DISTINCT employee_edusub 
						FROM sms_employeemaster 
						where employee_edusub!=''
						order by employee_edusub ASC ";
		$rs = dbQuery($SQL_SUBJECT);
		$total=dbRows($rs);
		$SubjectData = array("count" => $total, "data" => array());
		$i=0;
		if(dbRows($rs) > 0){
			while($row = dbArray($rs)){
				$temparray["employee_edusub"]  = $row["employee_edusub"];
				$SubjectData["data"][$i] = $temparray;   
				$i++;
			}
		}
		
		echo json_encode($SubjectData);
	}
		
	///profesnal
	if($_REQUEST['action'] == "Proqul"){
		$SQL_SUBJECT = "SELECT DISTINCT employee_profqualification 
						FROM sms_employeemaster 
						where employee_profqualification!=''
						order by employee_profqualification ASC ";
		$rs = dbQuery($SQL_SUBJECT);
		$total=dbRows($rs);
		$SubjectData = array("count" => $total, "data" => array());
		$i=0;
		if(dbRows($rs) > 0){
			while($row = dbArray($rs)){
				$temparray["employee_profqualification"]  = $row["employee_profqualification"];
				$SubjectData["data"][$i] = $temparray;   
				$i++;
			}
		}
		echo json_encode($SubjectData);
	}
	else if($_REQUEST['action'] == "Prosub"){
		$SQL_SUBJECT = "SELECT DISTINCT employee_profsub 
						FROM sms_employeemaster 
						where employee_profsub!=''
						order by employee_profsub ASC ";
		$rs = dbQuery($SQL_SUBJECT);
		$total=dbRows($rs);
		$SubjectData = array("count" => $total, "data" => array());
		$i=0;
		if(dbRows($rs) > 0){
			while($row = dbArray($rs)){
				$temparray["employee_profsub"]  = $row["employee_profsub"];
				$SubjectData["data"][$i] = $temparray;   
				$i++;
			}
		}
		
		echo json_encode($SubjectData);
	}
	
	/////other
	if($_REQUEST['action'] == "Othqul"){
		$SQL_SUBJECT = "SELECT DISTINCT employee_otherqualification 
						FROM sms_employeemaster 
						where employee_otherqualification!=''
						order by employee_otherqualification ASC ";
		$rs = dbQuery($SQL_SUBJECT);
		$total=dbRows($rs);
		$SubjectData = array("count" => $total, "data" => array());
		$i=0;
		if(dbRows($rs) > 0){
			while($row = dbArray($rs)){
				$temparray["employee_otherqualification"]  = $row["employee_otherqualification"];
				$SubjectData["data"][$i] = $temparray;   
				$i++;
			}
		}
		echo json_encode($SubjectData);
	}
	else if($_REQUEST['action'] == "Othsub"){
		$SQL_SUBJECT = "SELECT DISTINCT employee_othersub 
						FROM sms_employeemaster 
						where employee_othersub!=''
						order by employee_othersub ASC ";
		$rs = dbQuery($SQL_SUBJECT);
		$total=dbRows($rs);
		$SubjectData = array("count" => $total, "data" => array());
		$i=0;
		if(dbRows($rs) > 0){
			while($row = dbArray($rs)){
				$temparray["employee_othersub"]  = $row["employee_othersub"];
				$SubjectData["data"][$i] = $temparray;   
				$i++;
			}
		}
		
		echo json_encode($SubjectData);
	}
	
?>