<?php 
require "../commonincludefiles.php";
if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"])){	
	
	$condition="";
	$i=0;
	
	$sql = " SELECT * FROM lms_designation";
	$result = dbQuery($sql);
	$total  = dbRows($result);

	$designData = array("count" => $total, "rows" => array());
	if	(dbRows($result) > 0){
		$temparray = array();
		while($row = dbArray($result)){
			$temparray["designation_id"] =$row["designation_id"];
			$temparray["designation_name"]  = $row["designation_name"];			
			$designData["rows"][$i] = $temparray;   
			$i++;
		}										
	}				   		 
 	echo json_encode($designData);	
}
?>