<?php
include_once("../class/class.MySQL.php");
$db	=new MySQL();


if($_GET['action'] == 'load'){

	$branchid = $_GET['branch_id'];
	$departid = $_GET['depart_id'];
	//echo "SELECT * from employee join file on employee.e_id = file.e_id join department on department.depart_id = employee.departid where branchid = '$branchid' and departid = '$departid'";
	$department = $db->fetchQuery("SELECT * from employee join file on employee.e_id = file.e_id join department on department.depart_id = employee.departid join designation on employee.e_post
= designation.desig_id where branchid = '$branchid' and departid = '$departid' ");
	echo '{"name":'.json_encode($department).'}';
}

?>