PHP code example of palmiot / sql-splitter

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

    

palmiot / sql-splitter example snippets




$work = (new Palmiot\SqlSplitter\SqlSplitterCli([]))->run();    // Listen and work

print($work);   // STDOUT
 php
e Palmiot\SqlSplitter\SqlSplitter as Splitter;

$splitter = new Splitter();
$splitter->setFrom('test/fixtures/alldatabases.sql');
$splitter->setTo('databases');
$splitter->setPrefix('test');
$splitter->split();
$splitter->save();
$splitter->saveJoin();
foreach($splitter->getLog() as $entry){
    print($entry->getMessage());
}