I have a MySQL table with id, username, datetime and entry_id. I'm logging access to each entry. But I need just one row with same username and entry_id, because I use it just for notifications. How could I programatically delete useless rows? (using PHP and/or SQL)
EDIT:
username is normal string, ON DUPLICATE KEY wasn't working, because I want to check for duplicity just combination of same username and entry_id. I need just one row, with specific entry_id and username. I want to update just datetime. It's hard to explain :)
So, on each visit is insered new row. I just want datetime to update in every unique username and entry_id combination and not to create always new row.
Thank you for advance!