How to clone MySQL database schema in PHP using mysqli

Sometimes it can be crucial to duplicate a database structure automatically. I had this requirement in one of my current php projects – I solved it by taking a look at this code by Matteo Mattei. Unfortunately the code used some depracted mysql functions – I updated it to mysqli and created a small function which duplicates a database template.





Feel free to comment and improve.

Leave a Reply

Your email address will not be published. Required fields are marked *