Hi,
This seems very simple but i cant seem to get the queries right . would appreciate some guidance thanks !
a. I have a field with nos 1,2,3..... but there are some missing like say 7, 8 . How do I echo out the missing numbers ?
here's the code i have :
<?
$sql= "SELECT `CID` FROM `Customers` ORDER BY `CID` asc";
$res = mysql_query($sql);
$missing = array ($res);
$array_count = count($missing);
for($y=1; $y<$array_count; $y++) {
if(isset($missing[$y])) {
echo($missing[$y]);
}
else { $array_count++; }
}
?>
b. I also have records that are almost duplicates like say ABC Inc and ABC Supplies. How do I list all these out ?
Swati