PHP code example of infotech / mysql-data-dumper

1. Go to this page and download the library: Download infotech/mysql-data-dumper 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/ */

    

infotech / mysql-data-dumper example snippets


$dumper = new Infotech\MysqlDataDumper\MysqlDataDumper();
$dumper->addConnection($pdoInstance);
$dumper->backup(); // saves all rows from all tables of given connection(s) into memory

// execute process that makes indirect data modifications

$dumper->restore(); // restores saved data into database

// execute another process

$dumper->restore(); // restores the data again