I need to develop a plugin which will allow a user to either create or update the contents of a database table by uploading a CSV file. All wordpress tables except wp_posts must not be updateable. If I upload a file called [url removed, login to view] with the first row headings "City","State","Country","Latitude","Longitude" a table should be created (If it doesn't exist) with the previous columns, where tables are dynamically created all columns should be VARCHAR with an optional ID column. If the cities table already exists then the plugin should determine the primary key for the table, then query on that primary key (if it is included in the csv) and update the table data accordingly, if the primary key does not exist then the record should be created. Access to the plugin should be controlled through a custom user capability, assigned by default to admin and editor roles.
Only wordpress plugin developers need to answer, please