本文整理汇总了PHP中adoSchema::ExtractSchema方法的典型用法代码示例。如果您正苦于以下问题:PHP adoSchema::ExtractSchema方法的具体用法?PHP adoSchema::ExtractSchema怎么用?PHP adoSchema::ExtractSchema使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类adoSchema
的用法示例。
在下文中一共展示了adoSchema::ExtractSchema方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
if ($dbc) {
$existing_db = $db->SelectDB($dbname);
}
} else {
$dbc = false;
}
// Quick hack to ensure MySQL behaves itself (#2323)
$db->Execute("SET sql_mode := ''");
$current_version = $dp_version_major . '.' . $dp_version_minor;
$current_version .= isset($dp_version_patch) ? '.' . $dp_version_patch : '';
$current_version .= isset($dp_version_prepatch) ? '-' . $dp_version_prepatch : '';
if ($dobackup) {
if ($dbc) {
require_once DP_BASE_DIR . '/lib/adodb/adodb-xmlschema.inc.php';
$schema = new adoSchema($db);
$sql = $schema->ExtractSchema(true);
header('Content-Disposition: attachment; filename="dPdbBackup' . date('Ymd') . date('His') . '.xml"');
header('Content-Type: text/xml');
echo $sql;
exit;
} else {
$backupMsg = 'ERROR: No Database Connection available! - Backup not performed!';
}
}
?>
<html>
<head>
<title>dotProject Installer</title>
<meta name="Description" content="dotProject Installer">
<link rel="stylesheet" type="text/css" href="../style/default/main.css">
</head>
示例2: basename
<?php
error_reporting(E_ALL);
die('Enable me by commenting this out by editing ' . basename(__FILE__) . ' at line ' . __LINE__);
require_once '../vendor/adodb/adodb-php/adodb.inc.php';
require_once '../vendor/adodb/adodb-php/adodb-xmlschema03.inc.php';
$conf = @parse_ini_file('../flyspray.conf.php', true) or die('Cannot open config file.');
/* Start by creating a normal ADODB connection. */
$db = ADONewConnection($conf['database']['dbtype']);
$db->Connect($conf['database']['dbhost'], $conf['database']['dbuser'], $conf['database']['dbpass'], $conf['database']['dbname']) or die('Cannot connect to DB.');
$db->debug = true;
/* Use the database connection to create a new adoSchema object. */
$schema = new adoSchema($db);
$withdata = false;
$stripprefix = true;
$data = $schema->ExtractSchema($withdata, ' ', $conf['database']['dbprefix'], $stripprefix);
file_put_contents('flyspray-schema.xml', $data);
示例3: die
<?php
error_reporting(E_ALL);
require_once '../adodb/adodb.inc.php';
require_once '../adodb/adodb-xmlschema03.inc.php';
$conf = @parse_ini_file('../flyspray.conf.php', true) or die('Cannot open config file.');
/* Start by creating a normal ADODB connection.
*/
$db = ADONewConnection($conf['database']['dbtype']);
$db->Connect($conf['database']['dbhost'], $conf['database']['dbuser'], $conf['database']['dbpass'], $conf['database']['dbname']) or die('Cannot connect to DB.');
$db->debug = true;
/* Use the database connection to create a new adoSchema object.
*/
$schema = new adoSchema($db);
$data = $schema->ExtractSchema();
$data = str_replace('flyspray_', '', $data);
file_put_contents('flyspray-schema.xml', $data);
示例4: NewADOConnection
<?php
require '../adodb/adodb5/adodb.inc.php';
require '../adodb/adodb5/adodb-xmlschema.inc.php';
$_server = "IMAGESERVER,1433";
$_dbServer = "3170-090204";
$_dbServer = "disney-live";
$_dbUsername = "sa";
$_dbPassword = "1mage";
$dsn = "Driver={SQL Server};Server=" . $_server . ";Database=" . $_dbServer . ";";
$db =& NewADOConnection('odbc_mssql');
$db->Connect($dsn, $_dbUsername, $_dbPassword);
$dict = NewDataDictionary($db);
$schema = new adoSchema($db);
$ext = $schema->ExtractSchema(true);
//print_r($ext); die;