title: Export/Import mySQL query with PHP
body: <p>I'm looking to implement an Export/Import feature in a WordPress Plug-in. The only scenario that I can think of, is exporting the data after querying the database to some format and then re-reading it (for import) and creating a query with that data.</p>
  
  <p>I'm thinking if there is a shortcut for that. What I want basically is a function to get the SQL query of the data I have in the database and then execute it when importing. This is basically the same function in PHPmyAdmin that exports the database.</p>
  
  <p>Anyone have an idea?</p>