本文整理汇总了PHP中PMA_exportDatabase函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_exportDatabase函数的具体用法?PHP PMA_exportDatabase怎么用?PHP PMA_exportDatabase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_exportDatabase函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_exportServer
/**
* Export at the server level
*
* @param string $db_select the selected databases to export
* @param string $whatStrucOrData structure or data or both
* @param ExportPlugin $export_plugin the selected export plugin
* @param string $crlf end of line character(s)
* @param string $err_url the URL in case of error
* @param string $export_type the export type
* @param bool $do_relation whether to export relation info
* @param bool $do_comments whether to add comments
* @param bool $do_mime whether to add MIME info
* @param bool $do_dates whether to add dates
* @param array $aliases alias information for db/table/column
* @param string $separate_files whether it is a separate-files export
*
* @return void
*/
function PMA_exportServer($db_select, $whatStrucOrData, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $aliases, $separate_files)
{
if (!empty($db_select)) {
$tmp_select = implode($db_select, '|');
$tmp_select = '|' . $tmp_select . '|';
}
// Walk over databases
foreach ($GLOBALS['pma']->databases as $current_db) {
if (isset($tmp_select) && mb_strpos(' ' . $tmp_select, '|' . $current_db . '|')) {
$tables = $GLOBALS['dbi']->getTables($current_db);
PMA_exportDatabase($current_db, $tables, $whatStrucOrData, $tables, $tables, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $aliases, $separate_files == 'database' ? $separate_files : '');
if ($separate_files == 'server') {
PMA_saveObjectInBuffer($current_db);
}
}
}
// end foreach database
}
示例2: PMA_lockTables
if (!empty($_REQUEST['structure_or_data_forced'])) {
$table_structure = $tables;
$table_data = $tables;
}
if (isset($lock_tables)) {
PMA_lockTables($db, $tables, "READ");
try {
PMA_exportDatabase($db, $tables, $whatStrucOrData, $table_structure, $table_data, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $aliases, $separate_files);
PMA_unlockTables();
} catch (Exception $e) {
// TODO use finally when PHP version is 5.5
PMA_unlockTables();
throw $e;
}
} else {
PMA_exportDatabase($db, $tables, $whatStrucOrData, $table_structure, $table_data, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $aliases, $separate_files);
}
} else {
// We export just one table
// $allrows comes from the form when "Dump all rows" has been selected
if (!isset($allrows)) {
$allrows = '';
}
if (!isset($limit_to)) {
$limit_to = 0;
}
if (!isset($limit_from)) {
$limit_from = 0;
}
if (isset($lock_tables)) {
try {
示例3: isset
if ($do_mime) {
include_once 'libraries/transformations.lib.php';
}
// Include dates in export?
$do_dates = isset($GLOBALS[$what . '_dates']);
$whatStrucOrData = $GLOBALS[$what . '_structure_or_data'];
/**
* Builds the dump
*/
if ($export_type == 'server') {
if (!isset($db_select)) {
$db_select = '';
}
PMA_exportServer($db_select, $whatStrucOrData, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates);
} elseif ($export_type == 'database') {
PMA_exportDatabase($db, $tables, $whatStrucOrData, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates);
} else {
// We export just one table
// $allrows comes from the form when "Dump all rows" has been selected
if (!isset($allrows)) {
$allrows = '';
}
if (!isset($limit_to)) {
$limit_to = 0;
}
if (!isset($limit_from)) {
$limit_from = 0;
}
PMA_exportTable($db, $table, $whatStrucOrData, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $allrows, $limit_to, $limit_from, $sql_query);
}
if (!$export_plugin->exportFooter()) {
示例4: PMA_exportServer
/**
* Export at the server level
*
* @param string $db_select the selected databases to export
* @param string $whatStrucOrData structure or data or both
* @param object $export_plugin the selected export plugin
* @param string $crlf end of line character(s)
* @param string $err_url the URL in case of error
* @param string $export_type the export type
* @param bool $do_relation whether to export relation info
* @param bool $do_comments whether to add comments
* @param bool $do_mime whether to add MIME info
* @param bool $do_dates whether to add dates
* @param array $aliases Alias information for db/table/column
*
* @return void
*/
function PMA_exportServer($db_select, $whatStrucOrData, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $aliases)
{
/** @var PMA_String $pmaStr */
$pmaStr = $GLOBALS['PMA_String'];
if (!empty($db_select)) {
$tmp_select = implode($db_select, '|');
$tmp_select = '|' . $tmp_select . '|';
}
// Walk over databases
foreach ($GLOBALS['pma']->databases as $current_db) {
if (isset($tmp_select) && $pmaStr->strpos(' ' . $tmp_select, '|' . $current_db . '|')) {
$tables = $GLOBALS['dbi']->getTables($current_db);
PMA_exportDatabase($current_db, $tables, $whatStrucOrData, $export_plugin, $crlf, $err_url, $export_type, $do_relation, $do_comments, $do_mime, $do_dates, $aliases);
}
}
// end foreach database
}