1

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.

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.

Anyone have an idea?

1 Answer 1

3

Check out MySQL's SELECT Syntax, specifically the ... INTO OUTFILE portion. Couple that with MySQL's LOAD DATA INFILE Syntax and you might be in business.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.