View Single Post
Old 07-21-2008, 03:52 AM   #1 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default 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.
delayedinsanity is offline  
Reply With Quote