I have a script that exports database using the system function.
$command = "c:\\xampp\\mysql\\bin\\mysqldump --opt -uuser -ppassword- --databases movies --result-file=export.php";
system($command);
I need to know the equivalent to import a database.
I am using xampp and windows 8
I use something like this, with a mysqli object
$sql = file_get_contents('location/of/import.sql');
if($conn->multi_query($sql)){
while($conn->more_results() and $conn->next_result()){
;
}
};