Uncategorized
By Acty, October 22, 2013
A simple PHP function to get the contents of a MySQL database (uses MySQLi) as SQL file.
A simple PHP function that will return the contents of a MySQL database, complete with structure and content of all tables. You can implement this function however you please by including the function file, whether to save the output as a file, to copy one database to another or to do something different (see examples for programmed examples). This does not require mysqldump and does not require administrator access. The output provided can be used to recreate and restore the entire database, from the structure to the content of every single individual table.
This script comes with documentation with coded examples on how this function can be used (see the demo for more info), the code for the function is fully annotated.