<?php   
	require "commonincludefiles.php";
	
	$select_qry="SELECT fees.feesreceive_id
				 FROM   cms_studentdetail sd,
						cms_studentmaster sm,
						cms_feesreceivemaster fees
						
				WHERE  sm.student_id=sd.student_id AND
					   fees.student_id=sd.student_id AND
					   sd.`cur_branchid`=fees.branch_id AND
					   sd.`year_id`=7 AND
					   fees.year_id!=7 AND
					   sd.cur_semesterid=fees.semester_id";
	$out_select = dbQuery($select_qry);
	while($row=dbArray($out_select)) 
	{
		$update_qry="";
		$update_qry=" update cms_feesreceivemaster set year_id='7' where feesreceive_id='".$row['feesreceive_id']."'";
		dbQuery($update_qry);
		
	}
	exit;
?>
