1. Go to this page and download the library: Download nextras/multi-query-parser 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/ */
nextras / multi-query-parser example snippets
use Nextras\MultiQueryParser\MySqlMultiQueryParser;
$parser = new MySqlMultiQueryParser();
foreach ($parser->parseFile('migrations.sql') as $query) {
$connection->query($query);
}
$sql = "CREATE TABLE users (id INT); INSERT INTO users VALUES (1);";
foreach ($parser->parseString($sql) as $query) {
$connection->query($query);
}