作者:alexhav
项目:elixirjuic
PMA_DBI_select_db($db);
} else {
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . $add_query;
}
if (!PMA_exportData($db, $table, $crlf, $err_url, $local_query)) {
break;
}
}
// now export the triggers (needs to be done after the data because
// triggers can modify already imported tables)
if (isset($GLOBALS[$what . '_structure'])) {
if (!PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'triggers', $export_type)) {
break 2;
}
}
if (!PMA_exportDBFooter($db)) {
break;
}
}
if (!PMA_exportFooter()) {
break;
}
} while (false);
// End of fake loop
if ($save_on_server && isset($message)) {
$GLOBALS['js_include'][] = 'functions.js';
require_once './libraries/header.inc.php';
if ($export_type == 'server') {
$active_page = 'server_export.php';
require './server_export.php';
} elseif ($export_type == 'database') {
作者:quarteme
项目:xoopserve
} else {
$add_query = '';
}
if (!empty($sql_query)) {
$local_query = $sql_query . $add_query;
PMA_mysql_select_db($db);
} else {
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . $add_query;
}
if (isset($GLOBALS[$what . '_structure'])) {
PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates);
}
if (isset($GLOBALS[$what . '_data'])) {
PMA_exportData($db, $table, $crlf, $err_url, $local_query);
}
PMA_exportDBFooter($db);
}
/**
* Send the dump as a file...
*/
if (!empty($asfile)) {
// Convert the charset if required.
if ($output_charset_conversion) {
$dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer);
}
// Do the compression
// 1. as a gzipped file
if (isset($compression) && $compression == 'zip') {
if (@function_exists('gzcompress')) {
if ($type == 'csv') {
$extbis = '.csv';