PHP Classes

File: grabsql.php

Recommend this page to a friend!
  Classes of Alexander Selifonov   Retrieving, executing and saving partial data from SQL dump   grabsql.php   Download  
File: grabsql.php
Role: Example script
Content type: text/plain
Description: Using example
Class: Retrieving, executing and saving partial data from SQL dump
Extract table dumps from full MySQL database dumps
Author: By
Last change:
Date: 14 years ago
Size: 596 bytes
 

Contents

Class file image Download
<?PHP
/**
* Using datafromdump module example -
* Grabbing only SQL INSERT operators for desired partial tables from DB dump file
* @Author Alexander Selifonov <as-works@narod.ru>
* @link http://www.selifan.ru
*/

require_once('as_dbutils.php');
require_once(
'DataFromDump.php');

$from = 'E:\Backup\intranet\progress.sql';

$destfile = '_dataFromDump.dat';

echo
'<h4>Grabbing partial data from SQL dump file example</h4>';

$graber = new CDataFromDump(true);
$graber->ParseDump($from,'travel_companies,travel_employees,departments',$destfile,0);

$graber->PrintStatistics();