Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/mm/uprtou1/www.uprtou.ac.in/
Upload File :
Current File : /var/www/html/mmishra/mm/uprtou1/www.uprtou.ac.in/tunedata.php

<?php

if (!mysql_connect("localhost", "root", "alld"))
	die('Could not connect: ' . mysql_error());
else
	mysql_select_db("uprtou2011");

$tbl = 'examdata2011';
$no = 0; $i = 0; $sc = ''; $ec = '';
$webid = 'www.uprtou.ac.in';

echo "Operation in progress...\n";

$rs = mysql_query("select * from studycenters order by centercode");
while ($o = mysql_fetch_object($rs)) {
	$sc = $o->centercode;

	$sr = mysql_query("select * from examdata2011 where studycenter='$sc' order by examcenter");
	while ($q = mysql_fetch_object($sr)) {
		$no++;
		if ($ec == '' || $ec <> $q->examcenter) {
			if (!mysql_num_rows(mysql_query("select * from examcenters where studycenter='$sc' and examcenter='$ec' and year='2011'"))) {
				$i++;
				echo("$i. insert into examcenters values('$sc','$ec','JUN',2011,$no)\n");
				mysql_query("insert into examcenters values('$sc','$ec','JUN',2011,$no)");
				//mysql_query("update studycenters set programs='$p' where centercode='$s'");
				$no = 0;
			}
		}
		$ec = $q->examcenter;
	}
}

echo "$no total records updated)";

?>