phpbar.de logo

Mailinglisten-Archive

[php] =?iso-8859-1?Q?AW:_=5Bphp=5D_Doppelte_Datens=E4tze_l=F6schen?=

[php] AW: [php] Doppelte Datensätze löschen

Danny php_(at)_phpcenter.de
Mon, 4 Mar 2002 22:00:08 +0100


Nachdem ich jetzt einiges versucht habe , auch mit count(*)
hier einmal das script


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
$fis = mysql_query("select id, firma, plz, strasse from mytabelle group by
firma, plz, strasse HAVING count(*) > 1");

while($f=mysql_fetch_array($fis)){
	mysql_query("delete from mytabelle where id like '$f[id]'");
}

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

nach 30sec kommt timeout und es sind vielleicht 20 Datensätze gelöscht :-((


Doppelte sind es ab 18.000 von 130.000 *schluchz*

Wie kann ich alle doppelten aufeinmal löschen ????????????????????



Bitte dringend um rat, sonst wird es wieder einmal ne lange Nacht oder Woche
:-((


Danny


php::bar PHP Wiki   -   Listenarchive