07-21-2008, 03:52 AM
|
#1 (permalink)
|
|
The Prestige
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 852
Thanks: 31
|
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.
|
|
|
|