Forum Moderators: coopster
I'm just posting this problem I have to get some suggestions. I created an install file for a client (sort of like phpBB's install file) that creates everything that is needed for the site. However, I have information in the database that I want to restore once everything is created on their server. The backup was created using mysqldump, but I cannot figure out how to load that backup into their server when I do not know the location of mysql.exe (this is the only way I know how to restore). I think the solution might involve using the source mysql command, but I cannot get it :(
Any suggestions are greatly appreciated. Thanks!
$text = file_get_contents("backup.sql");
$inserts = explode("##END##",$text);
$count = count($inserts);
for($i = 0; $i<$count; $i++)
{
mysql_query($inserts[$i]);
}