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
Tell me what is the difference between unset() and unlink()?
How to retrieve values out of an array?
What function should you use to join array elements with a glue string?
What is the difference between exception::getmessage and exception::getline?
How do you trim spaces in excel?
What is the name of the scripting engine that powers PHP?
How do I run a php file?
Is echo a function in php?
What is the difference between explode () and split () functions in php?
Is null or empty c#?
Can we use get instead of post?
What is strlen function in php?
What is factory pattern in php?
What is csrf token and why it is required?
How to download files from an external server with code in php?