Importing an SQL dump via PHP
Does anybody have any suggestions on the best way to go about importing an SQL database dump via PHP?
The two obvious solutions so far:
1. Don't use an SQL dump, hardcode my queries into my script.
2. Strip my SQL dump down to just the CREATE commands, place some kind of delimiter between each one, read the file in with file_get_contents and then preg_split it based on the delimiter.
Take a look at this tool for importing large dumps.. It was developed in PHP and depending on what it is you are looking for is GREAT time saver
BigDump: The Staggered MySQL Dump Importer
|All times are GMT. The time now is 02:13 PM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0