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 the use of final class in php?
What is the purpose of break and continue statement?
Does php support function overloading?
What are php parameters?
Differentiate between require and include?
What's the output of the ucwords function in this example?
Is java is better than php?
Write a program to find the factorial of a number in php?
Explain what is the difference between mysql_fetch_array() and mysql_fetch_assoc()?
Where is session value stored?
Why does sql injection happen?
Does strlen include null?
What is php sequence?
How many days will it take to learn php?
What is the use of explode() function?