I usually do this, but later i found this there were an error by doing this:
DELETE FROM pms_log_sms
WHERE id NOT IN (
SELECT DISTINCT id FROM (
SELECT MAX(id) AS id FROM pms_log_sms
GROUP BY username,`time`,text
HAVING COUNT(*) > 0 ) A
);
my table have :
unique id (autoincre), username, text, time
text is encoded for example:
record 1:
//FuxOBtL8Lmop0Az943oBNWSTvUYSk8+euJWKgMJHk=
and record 2:
//FuxOBtL8Lmop0Az943oDB+aoIMJXdTltYQJ1j0TbRARwwCIZiwIwovq8LrgYtV
the queries will found these as duplicate and delete them but they aren't same text, sometime they post at the same time, but diff unique id, same username but the query will found these as duplicate data and delete them but they aren't same text
any solution for this ?