Hello,
I have a database in MySql which has 2 fields. The 1st field is called id which is the primary key. The 2nd field is called full_add where there are some duplicates.
I would like to delete all the duplicates in the full_add field leaving only 1 record behind.
It does not matter if the corresponding primary key gets deleted as well because the primary key is not related to any other table or database. I prefer not to use temporary tables or create new tables because my webhost does not allocate much memory to me & my database is quite big.
I've written my code half way but I do not know how to continue with the appropriate Query statement. My code is below. Could you please help me to complete it?
Thanks
<?php
$username="abc123";
$password="abc123";
$database="abc123";
$host="localhost";
if(isset($Submit1)){
mysql_connect ("$host","$username","$password") or die(mysql_error());
mysql_select_db($database) or die("Where's the database man?");
//this is where I'm stuck :-(
}
?>