<?php
	require "../commonincludefiles.php";
   	$objcms_branchsemesterMgmt = new cms_branchsemesterMgmt();
	$i=0;
	$order_field=" branch_name ASC, semester_id ";
	$order_type=" ASC ";
	$rs = $objcms_branchsemesterMgmt->getAllRecords($limit,$start,$where,$order_field,$order_type);
	$total = dbRows($rs);
	$SemesterData = array("count" => $total, "data" => array());
	if(dbRows($rs) > 0){
		while($row = dbArray($rs)){
			$temparray["branchsemester_id"]  = $row["branchsemester_id"];
			$temparray["branch_id"]  = $row["branch_id"];
			$temparray["branch_name"]  = $row["branch_name"];
			$temparray["semester_id"]  = $row["semester_id"];
			$temparray["semester_name"]  = $row["semester_name"];
			$temparray["noofdiv"]  = $row["noofdiv"];
			$SemesterData["data"][$i] = $temparray;   
			$i++;
		}
	}
	echo json_encode($SemesterData);	
?>