PHP code example of mrceperka / sql-file-loader

1. Go to this page and download the library: Download mrceperka/sql-file-loader 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/ */

    

mrceperka / sql-file-loader example snippets



use \MrCeperka\SqlFileLoader\SqlFileLoader;

$resource = __DIR__ . '/data.sql';
// or with stdin
// $resource = fopen('php://stdin', 'r');

$loader = new SqlFileLoader($resource);
$queries = $loader->getQueries();