As you (probably) know I'm running some webgames at my website, and they have global highscores. I'd like to get rid of duplicate entires having the same player name. Basically for a given name I'd like to keep the highest score only.
I'm using an SQL database and wanted to know if the comparison/replace stuff can be made directly with the SQL command REPLACE? And if yes how? (I checked the SQL doc and I think the answer is no).
I know I can do it with PHP but it would probably have a higher load on the server as I would have to first read the data, eventually delete a row and then write a new row.
PS: Yes it's rather an easy method assuming each player would use a unique username, but I think setting up a login system would be over complicated.


) know I'm running some webgames at my website, and they have global highscores. I'd like to get rid of duplicate entires having the same player name. Basically for a given name I'd like to keep the highest score only.
Reply With Quote

