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
Why php is used with mysql?
Is php 7.0 stable?
How to call a php function from html button?
What is php full form?
Are php session secure?
What is stdclass in php?
Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?
Which programming language does php resemble?
Where do I run php code?
Tell me what is the difference between the functions strstr() and stristr()?
Which php mvc framework is best?
Explain how to submit form without a submit button.
What is an example of a variable?
in PHP for pdf which library used?
How variables are passed through arguments?