PHP code example of daveismyname / sql-import
1. Go to this page and download the library: Download daveismyname/sql-import library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
daveismyname / sql-import example snippets
use Dcblogdev\SqlImport\Import;
$filename = 'database.sql';
$username = 'root';
$password = '';
$database = 'sampleproject';
$host = 'dev';
$dropTables = true;
$forceDropTables = false;
new Import($filename, $username, $password, $database, $host, $dropTables, $forceDropTables);