1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Wrap table.nowrap with div[style="overflow-x: auto"]

This commit is contained in:
kPherox
2018-10-25 19:31:28 +09:00
committed by Jakub Vrana
parent 83a0776e8d
commit e4837a0564
10 changed files with 20 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
odd(''); // reset odd for each result
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
if (!$i) {
echo "<div style='overflow-x: auto;'>\n";
echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) {
@@ -85,7 +86,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
echo "<td>$val";
}
}
echo ($i ? "</table>" : "<p class='message'>" . lang('No rows.')) . "\n";
echo ($i ? "</table>\n</div>" : "<p class='message'>" . lang('No rows.')) . "\n";
return $return;
}