Restoring a Phpmyadmin backup using just PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
buzzology
Forum Newbie
Posts: 3
Joined: Tue Oct 27, 2009 7:28 pm

Restoring a Phpmyadmin backup using just PHP

Post by buzzology »

Hey Guys,
No pro at php, so this may be something obvious, however i have had no luck at all with it. What im trying to do is to create new databases based on a single phpmyadmin backup. So for example, a new user signs up - then a database is created based on their username. What im wondering is if there is a way to export the database im using so that it can be read in as a text file(or something along those lines) without causing php to explode?
Thanks in advance for any suggestions,
Cheers,
Buzz
buzzology
Forum Newbie
Posts: 3
Joined: Tue Oct 27, 2009 7:28 pm

Re: Restoring a Phpmyadmin backup using just PHP

Post by buzzology »

Hey guys, problem solved - although unfortunately it took waaaay longer than expected. Basically ended up just creating a loop to write out all the data to an sql file, then did the same to load it back in. Not sure why i couldn't do the same for a phpmyadmin backup but this method seems to work just as well as originally intended.

Cheers,
Buzz
Post Reply