I am trying to create a script where I can import .sql files from multiple directories into my database.
I am able to import one SQL by this code:
<?php
$sql = file_get_contents('mysqls/hey.sql');
$qr = $dbh->exec($sql);
?>
But when I move on to make it read more then one .sql file it dosnt work:
<?php
$sql = file_get_contents('mysqls/*.sql');
$qr = $dbh->exec($sql);
?>
I would also like for it to go into multiple folders that may be created in the future [folders would be in the same directory as the code].
My database connection has already been made in a PDO config connection.