Skip to content

BryR0/Examples-STACKOVERFLOW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Examples Export databases

Note

export all database or specific schema

Usage

database export

database export/import 1 schema

//export 1 schema in file dbtest.sql
$conn = GestionDB::getDB();
if($conn->Backup("dbtest.sql","dbtest")){
	echo "backup create!";
}
//import 1 database in dbtest
if($conn->Restore("dbtest.sql","dbtest")){
	echo "databases recreate!".$r;
}

export/import all database schema

//export all schema
$conn = GestionDB::getDB();
if($conn->Backup("alldb.sql")){
	echo "backup create!";
}

//import all dbs
if($conn->Restore("alldb.sql")){
	echo "databases recreate!".$r;
}