The database got duplicate records. It is necessary to clear the first copy (the key field is smaller than that of the subsequent copy). Example:
uidl id date spam 533 590 2011-08-09 00:00:02 0 535 AAA 2011-08-09 00:11:12 0 536 590 2011-08-09 00:00:02 1 540 AAA 2011-08-09 00:11:12 1
The duplicate criteria are the same id
and date
.
Now I use this query:
CREATE TABLE tmp SELECT * FROM `testing` WHERE 1 GROUP BY date,id
It creates a table of unique (recent) entries. But this is not very convenient, I would just like to delete each first entry from the pair.