PHP Classes

File: dbdump.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Sadat PHP Database Dumper   dbdump.php   Download  
File: dbdump.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Sadat PHP Database Dumper
Dump a DB using mysqldump or output SQL statements
Author: By
Last change:
Date: 3 years ago
Size: 650 bytes
 

Contents

Class file image Download
<?php

include('dump.class.php');

//set host
$sql->setDBHost('127.0.0.1');

//set host
$sql->setDBPort('3306');

//set username
$sql->setDBUsername('root');

//set password
$sql->setDBPassword('');

//set DB name
$sql->setDBName('trello');

//set sql file name
$sql->setSQLFileName('peregrin');

//set sql dump path, make sure the path has read and write privileges
$sql->setDumpPath('C:\Users/Name/Desktop/DB');

//Incase there is no mysqldump in your path or its not installed
$sql->setMySQLDump(false);

//set download, if you wanna run it through a browser and download the sql file
$sql->setDownloadSQLFile(true);

// dump
$sql->dumpDB(true);