<?php

	/*echo md5('');*/

	include_once 'includes/applicants_functions.php';



	$r = mysqli_query(dbc(),"SELECT id  FROM applicants_nce WHERE programme_applied_for = 0 AND sponsorship_type = 5  AND session = 4 AND programme_type_applied_for = 2");
	if(mysqli_num_rows($r) > 0 )
	{
		while($row = mysql_fetch_array($r, MYSQLI_ASSOC))
		{

			$id = $row['id'];
			$appno = get_applicant_application_number($id);
			$prog = get_applicant_programme_id($id);
			$sch = get_applicant_school_admitted_to($id);
			$dept = get_applicant_department_id($id);

		
			$query = "UPDATE applicants_nce 
					SET school_applied_for = '$sch', department_applied_for = '$dept',
						programme_applied_for = '$prog'
					WHERE id = '$id'";

			$rr = mysqli_query(dbc(),$query);
			if ($rr) {

				echo "$appno <br>";
				$id = '';
				$type_id = '';
				$prog = '';
				$sch = '';
				$dept = '';

			}


		}
	}
	

	





?>