<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MySQL: Remove Duplicate Entries</title>
	<atom:link href="http://mediakey.dk/~cc/mysql-remove-duplicate-entries/feed/" rel="self" type="application/rss+xml" />
	<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/</link>
	<description>Safe with most medications</description>
	<lastBuildDate>Fri, 19 Mar 2010 05:20:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: HOW-TO: Delete Duplicate SQL - MySQL &#124; ShamHardy.com</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-78429</link>
		<dc:creator>HOW-TO: Delete Duplicate SQL - MySQL &#124; ShamHardy.com</dc:creator>
		<pubDate>Mon, 15 Feb 2010 17:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-78429</guid>
		<description>[...] http://mediakey.dk/~cc/mysql-remove-duplicate-entries/ mysql &gt; ALTER IGNORE TABLE tablename ADD UNIQUE INDEX&#40;value1, [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://mediakey.dk/~cc/mysql-remove-duplicate-entries/" rel="nofollow">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/</a> mysql &gt; ALTER IGNORE TABLE tablename ADD UNIQUE INDEX&#40;value1, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-77943</link>
		<dc:creator>Marcin</dc:creator>
		<pubDate>Tue, 06 Oct 2009 09:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-77943</guid>
		<description>You solution can remove good entries and keep old ones.

For example there can be two duplicates with id 5, and 200 and obviously 200 is most up-to-date, but when you execute your SQL 200 will be removed and 5 will stay.</description>
		<content:encoded><![CDATA[<p>You solution can remove good entries and keep old ones.</p>
<p>For example there can be two duplicates with id 5, and 200 and obviously 200 is most up-to-date, but when you execute your SQL 200 will be removed and 5 will stay.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL: Zeilen mit doppelten Werten löschen &#124; What I know is what you get</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-72416</link>
		<dc:creator>MySQL: Zeilen mit doppelten Werten löschen &#124; What I know is what you get</dc:creator>
		<pubDate>Sun, 28 Jun 2009 12:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-72416</guid>
		<description>[...] Erkenntnis ist allerdings nicht auf meinen Mist gewachsen, sondern stammt von http://mediakey.dk/~cc/mysql-remove-duplicate-entries/.   Subscribe to comments  Comment &#124; Trackback &#124;  Post Tags: duplicate rows, [...]</description>
		<content:encoded><![CDATA[<p>[...] Erkenntnis ist allerdings nicht auf meinen Mist gewachsen, sondern stammt von <a href="http://mediakey.dk/~cc/mysql-remove-duplicate-entries/" rel="nofollow">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/</a>.   Subscribe to comments  Comment | Trackback |  Post Tags: duplicate rows, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaamkaaj</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-67554</link>
		<dc:creator>kaamkaaj</dc:creator>
		<pubDate>Wed, 15 Apr 2009 07:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-67554</guid>
		<description>Is there any short way of doing this, it is too complex for a beginner like me.</description>
		<content:encoded><![CDATA[<p>Is there any short way of doing this, it is too complex for a beginner like me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: delilah</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-63539</link>
		<dc:creator>delilah</dc:creator>
		<pubDate>Fri, 06 Mar 2009 03:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-63539</guid>
		<description>Thanks, good stuff!</description>
		<content:encoded><![CDATA[<p>Thanks, good stuff!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zasssssssss</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-62623</link>
		<dc:creator>zasssssssss</dc:creator>
		<pubDate>Fri, 20 Feb 2009 06:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-62623</guid>
		<description>xxxxsZZZZZZZZZZZZZZZZZZZZ</description>
		<content:encoded><![CDATA[<p>xxxxsZZZZZZZZZZZZZZZZZZZZ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack M</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-61047</link>
		<dc:creator>Jack M</dc:creator>
		<pubDate>Sun, 01 Feb 2009 13:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-61047</guid>
		<description>if index cannot ne redefined:

 1)
  {
    $x = 1;
    while($x &lt;= $i)// we loop inside the loop - this can mean quite a lot of operations so think carefully about the limit above
    {
      if($entry[$i] == $entry[$x])// checking string against previous entries
      {
        $delete_duplicate = mysql_query(&quot;DELETE FROM `table_name` WHERE `id`=&#039;&quot;.$id[&#039;id&#039;].&quot;&#039;&quot;); //delete duplicate 
        /*
        or if wish to check first then add another field in the table (e.g. `check`) and change query into
        something like this:
            $mark_duplicate = mysql_query(&quot;UPDATE `table_name` SET `check`=&#039;1&#039;&quot;);
        then if happy run something lie this:
            $delete = mysql_query(&quot;DELETE FROM `table_name` WHERE `check`=&#039;1&#039;&quot;)
        */
        echo &#039;Entry #&#039;.$id[$i].&#039; was the same as entry &#039;.$id[$x].&#039; and has been deleted.&#039;;
      }
    $x++;
    }
  }
  $i++;
}
?&gt;</description>
		<content:encoded><![CDATA[<p>if index cannot ne redefined:</p>
<p> 1)<br />
  {<br />
    $x = 1;<br />
    while($x &lt;= $i)// we loop inside the loop &#8211; this can mean quite a lot of operations so think carefully about the limit above<br />
    {<br />
      if($entry[$i] == $entry[$x])// checking string against previous entries<br />
      {<br />
        $delete_duplicate = mysql_query(&#8220;DELETE FROM `table_name` WHERE `id`=&#8217;&#8221;.$id['id'].&#8221;&#8216;&#8221;); //delete duplicate<br />
        /*<br />
        or if wish to check first then add another field in the table (e.g. `check`) and change query into<br />
        something like this:<br />
            $mark_duplicate = mysql_query(&#8220;UPDATE `table_name` SET `check`=&#8217;1&#8242;&#8221;);<br />
        then if happy run something lie this:<br />
            $delete = mysql_query(&#8220;DELETE FROM `table_name` WHERE `check`=&#8217;1&#8242;&#8221;)<br />
        */<br />
        echo &#8216;Entry #&#8217;.$id[$i].&#8217; was the same as entry &#8216;.$id[$x].&#8217; and has been deleted.&#8217;;<br />
      }<br />
    $x++;<br />
    }<br />
  }<br />
  $i++;<br />
}<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myrddin</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-57443</link>
		<dc:creator>myrddin</dc:creator>
		<pubDate>Mon, 29 Dec 2008 23:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-57443</guid>
		<description>Nice, very nice ! Thank you, very fast !!</description>
		<content:encoded><![CDATA[<p>Nice, very nice ! Thank you, very fast !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomy</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-43969</link>
		<dc:creator>Tomy</dc:creator>
		<pubDate>Sun, 15 Jun 2008 16:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-43969</guid>
		<description>Great! Cheers! :)</description>
		<content:encoded><![CDATA[<p>Great! Cheers! <img src='http://mediakey.dk/~cc/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://mediakey.dk/~cc/mysql-remove-duplicate-entries/comment-page-1/#comment-41294</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Thu, 20 Mar 2008 12:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://mediakey.dk/~cc/mysql-remove-duplicate-entries/#comment-41294</guid>
		<description>I just wanted to say thank you...  I looked everywhere trying to find a way to move duplicates in sql without having to write alot of code or create new database backups etc..

ALTER IGNORE TABLE dupTest ADD UNIQUE INDEX(a,b);

lovely jublee 
thank you</description>
		<content:encoded><![CDATA[<p>I just wanted to say thank you&#8230;  I looked everywhere trying to find a way to move duplicates in sql without having to write alot of code or create new database backups etc..</p>
<p>ALTER IGNORE TABLE dupTest ADD UNIQUE INDEX(a,b);</p>
<p>lovely jublee<br />
thank you</p>
]]></content:encoded>
	</item>
</channel>
</rss>
