Answer Posted / rakesh dongarwar
$query="SELECT * FROM `emails` ORDER BY `email` ASC LIMIT 0, 30";
mysql_query($query);
$result=mysql_query($query);
$numrows=mysql_num_rows($result);
$totalemailsdeleted=0;
$i=1;
$i2=0;
while($i2 < $numrows)
{
$id=mysql_result($result, $i2, id);
$email=mysql_result($result, $i2, email);
while($i < $numrows)
{
$idcompare=mysql_result($result, $i, id);
$emailcompare=mysql_result($result, $i, email);
if($emailcompare == $email)
{
$query="DELETE FROM `emails` WHERE `id` = '$idcompare' LIMIT 1";
mysql_query($query);
$emailsdeleted.="$emailcompare<br>";
$totalemailsdeleted++;
$numrows=mysql_num_rows($result);
}
else
{
}
$i++;
}
$i2++;
}
| Is This Answer Correct ? | 4 Yes | 11 No |
Post New Answer View All Answers
What is a string in php?
What is final in php?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
What is array filter in php?
What are classes in php?
Is key in array php?
What is a model in php?
Does php have a future?
What is use of preg_replace in php?
Which escape sequences can be used in single quoted strings in php?
How is it possible to set an infinite execution time for php script?
What are the functions of string?
How to connect to mysql from a php script?
What is the use of dual table in mysql?
What is php pathinfo?