c16c57b1b1
Change Adminer class to adminer_ functions.inc.php Unify includes Unify adminer_credentials() Don't use JUSH in Editor Separate identifier and description in breadcrumb Simplify where() git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@800 7c3ca157-0c34-0410-bff1-cbf682f78f5c
28 lines
731 B
PHP
28 lines
731 B
PHP
<?php
|
|
function dump_table($table, $style, $is_view = false) {
|
|
echo "\xef\xbb\xbf"; // UTF-8 byte order mark
|
|
dump_csv(array_keys(fields($table)));
|
|
}
|
|
|
|
function dump_data($table, $style, $select = "") {
|
|
global $dbh;
|
|
$result = $dbh->query(($select ? $select : "SELECT * FROM " . idf_escape($table)));
|
|
if ($result) {
|
|
while ($row = $result->fetch_assoc()) {
|
|
dump_csv($row);
|
|
}
|
|
$result->free();
|
|
}
|
|
}
|
|
|
|
function dump_headers($identifier, $multi_table = false) {
|
|
$filename = (strlen($identifier) ? friendly_url($identifier) : "dump");
|
|
$ext = "csv";
|
|
header("Content-Type: text/csv; charset=utf-8");
|
|
header("Content-Disposition: attachment; filename=$filename.$ext");
|
|
return $ext;
|
|
}
|
|
|
|
$dump_output = "";
|
|
$dump_format = "CSV";
|