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
How many different types of messages available in php?
Explain what is the difference between $var and $$var?
Why use static methods php?
Explain how you can update memcached when you make changes to php?
How we load all classes that placed in different directory in one php file , means how to do auto load classes.
How does api connect to database?
What does pear stand for?
What language is php written in?
Is set in php?
Tell me how a constant is defined in a php script?
What is string function sql?
What is mysqli_real_escape_string?
How to create a session? How to set a value in session?
How many types of inheritances used in php and how we achieve it.
How to get the ip address of the client?