ElgarL/Towny — pull request #146 by Aoredon (2014-10-19 18:08:56+00:00)
Title: Change the MySQL Command to Fix Errors

Many people have errors when using MySQL and Towny together. This is because Towny will try INSERT new entries into the database when they already exist.

For instance, if someone changes their Town name, Towny will try to insert the exact town, but with a different name back into the database instead of modifying the current town entry.

I've changed the INSERT INTO SQL command to a REPLACE INTO SQL command. This means it will insert entries into the database, however if they have the same primary key, it will simply UPDATE it. This prevents Towny from creating errors.