DBUtil Class Reference
Detailed Description
DBUtil provides database helper functions.
Definition at line 27 of file DBUtil.php.
Static Public Member Functions | |
static | executeScript ($file, $initSection) |
static | copyDatabase ($srcName, $destName, $server, $user, $password) |
static | createDatabase ($name, $server, $user, $password) |
Member Function Documentation
◆ executeScript()
|
static |
Execute a sql script.
Execution is done inside a transaction, which is rolled back in case of failure.
- Parameters
-
$file The filename of the sql script $initSection The name of the configuration section that defines the database connection
- Returns
- Boolean whether execution succeeded or not.
Definition at line 88 of file DBUtil.php.
◆ copyDatabase()
|
static |
Duplicate a database on the same server (same user).
This works only for MySQL databases.
- Parameters
-
$srcName The name of the source database $destName The name of the source database $server The name of the database server $user The user name $password The password
Definition at line 146 of file DBUtil.php.
◆ createDatabase()
|
static |
Crate a database on the server.
This works only for MySQL databases.
- Parameters
-
$name The name of the source database $server The name of the database server $user The user name $password The password
Definition at line 194 of file DBUtil.php.