Using a database view = evil incarnate?

In custom tables you do whatever you want. If a view is what you need, use it.

However, you might consider separating the code in an exporter. See wp-admin/includes/export.php for a start. If you keep the actual SQL and the export format separate you can:

  • create a new exporter for another table structure easily
  • use other data for the same format
  • implement an user interface to customize the export (separator for CSV, encoding, tables and columns)

The plugin you mentioned doesn’t do that. Plus, it doesn’t even use the export API interface. There should always be just one single place to export data: Tools/Export.

Leave a Comment