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/uniquedata.php

<?php
if (!mysql_connect("localhost", "root", "alld"))
	die('Could not connect: ' . mysql_error());
else
	mysql_select_db("uprtou2011");
$tbl = 'enrollments';
$no = 0; $i = 0;
$eno = '';

$rs = mysql_query("select * from $tbl order by enrollno");
while ($o = mysql_fetch_object($rs)) {
	$i++;
	if ($eno == $o->enrollno) {
		$no++;
		echo ("delete from $tbl where rowid=$o->rowid\n");
		mysql_query("delete from $tbl where rowid=$o->rowid");
	}
	$eno = $o->enrollno;
}
echo "$no records deleted";
?>