PHP code example of comoco / mysqldump-php
1. Go to this page and download the library: Download comoco/mysqldump-php 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/ */
comoco / mysqldump-php example snippets
use comoco\Mysqldump\Mysqldump;
$mysqldump = new Mysqldump;
$content = $mysqldump->setHost('localhost')
->setPort(3306)
->setUser('username')
->setPassword('password')
->setDatabase('database')
->addTable('table1', 'id < 2 || id > 6')
->disableExtendedInsert()
->disableLockTable()
->hexBlob()
->completeInsert()
->withoutComments()
->withoutAddLock()
->setGtidPurged('OFF')
->dump();
bash
composer