// $query ="SELECT distinct pno_unit_code,unit_hindi,def_type FROM `sub_unitmaster` WHERE def_type=1 union all SELECT distinct sub_unit_code,sub_unit_hindi,def_type FROM `sub_unitmaster` WHERE def_type=2" ;
//$empquery=mysql_query($query) or die("Error in query = ".mysql_error());
$i=1;
//while($row=mysql_fetch_array($empquery)){
foreach($unitData as $as){
//$units=$units.','. $as['code'];
//$transrs=mysql_query("Selcet count(*) as transfer from new_posting_detail where joining_unit=".$row['pno_unit_code']." and transfer_posting_flag='A'");
$joinrs=mysql_query("SELECT count(*) as joinings from new_posting_detail where joining_unit=". $as['code']." and transfer_posting_flag='TP'") or die(mysql_error());
$relivingrs=mysql_query("SELECT count(*) as reliving from new_posting_detail where joining_unit=". $as['code']." and transfer_posting_flag='T'");
// $transfercnt=mysql_fetch_assoc($transrs);
$joiningcnt=mysql_fetch_assoc($joinrs);
$relivingcnt=mysql_fetch_assoc($relivingrs);
?>