mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 01:24:17 +02:00
Save bytes
This commit is contained in:
@@ -626,10 +626,10 @@ username.form['auth[driver]'].onchange();
|
|||||||
global $connection, $jush;
|
global $connection, $jush;
|
||||||
$max_packet = ($jush == "sqlite" ? 0 : 1048576); // default, minimum is 1024
|
$max_packet = ($jush == "sqlite" ? 0 : 1048576); // default, minimum is 1024
|
||||||
if ($style) {
|
if ($style) {
|
||||||
if ($_POST["format"] == "sql" && $style == "TRUNCATE+INSERT") {
|
if ($_POST["format"] == "sql") {
|
||||||
|
if ($style == "TRUNCATE+INSERT") {
|
||||||
echo truncate_sql($table) . ";\n";
|
echo truncate_sql($table) . ";\n";
|
||||||
}
|
}
|
||||||
if ($_POST["format"] == "sql") {
|
|
||||||
$fields = fields($table);
|
$fields = fields($table);
|
||||||
}
|
}
|
||||||
$result = $connection->query($query, 1); // 1 - MYSQLI_USE_RESULT //! enum and set as numbers
|
$result = $connection->query($query, 1); // 1 - MYSQLI_USE_RESULT //! enum and set as numbers
|
||||||
|
@@ -49,7 +49,7 @@ if ($_GET["val"] && is_ajax()) {
|
|||||||
header("Content-Type: text/plain; charset=utf-8");
|
header("Content-Type: text/plain; charset=utf-8");
|
||||||
foreach ($_GET["val"] as $unique_idf => $row) {
|
foreach ($_GET["val"] as $unique_idf => $row) {
|
||||||
$as = convert_field($fields[key($row)]);
|
$as = convert_field($fields[key($row)]);
|
||||||
echo $connection->result("SELECT" . limit(($as ? $as : idf_escape(key($row))) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf, $fields) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1));
|
echo $connection->result("SELECT" . limit($as ? $as : idf_escape(key($row)) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf, $fields) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1));
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user