hi, i've got a table collecting info from html forms. problem is, certain wiseguys always make multiple entries. could someone clue me in to how i can select the Last entry where there is a duplicate for the User (type text, these are email addresses), and automatically delete any previous entries? i'm using a column 'id' int auto_increment as my index: the last entry from a User will automatically have a higher id #. example: i've only gotten this far: this selects all users with multiple entries SELECT * from table_name GROUP BY User HAVING Count(User) > 1 thanks muchly, tom --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php