Open blessedjasonmwanza opened 3 years ago
With the experience of importing the database file, the better way to do this is to use the SQL command line or other database management tools to ensure the correct result.
Hey @catfan π€ ... I was thinking about this and experimented with something that works.
//First, we load the db file into a variable
$db_sql_file = file_get_contents("db_file.sql");
//then we run query on it to perform whatever instructions are in the SQL file against the database instance we're connected toπ
$db_instance->query($db_sql_file);
Is this something that can be improved on? You may share your opinion or ideas whenever time allows.
HappyCoding π¨π½βπ»
@blessedjasonmwanza Yes, it can simply work in some cases. However, the result is not guaranteed if with a different setting, database version, platform, or others.
@blessedjasonmwanza Yes, it can simply work in some cases. However, the result is not guaranteed if with a different setting, database version, platform, or others.
Oh - I see, π€ ... Makes a lot of sense π€ . Thank you.
Information
Description
Detail Code example
Response