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

SQLite: Display number of rows in database overview

This commit is contained in:
Jakub Vrana
2012-07-29 10:45:38 -07:00
parent f1153aa35a
commit e8b95f127f
3 changed files with 8 additions and 5 deletions

View File

@@ -13,10 +13,10 @@ if ($_GET["script"] == "db") {
foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
if ($table_status[$key] != "") {
$val = number_format($table_status[$key], 0, '.', lang(','));
json_row("$key-$id", ($key == "Rows" && $val && (
$table_status["Engine"] == "InnoDB" || // MySQL InnoDB
$table_status["Engine"] == "table" // PostgreSQL table reltype
) ? "~ $val" : $val));
json_row("$key-$id", ($key == "Rows" && $val && $table_status["Engine"] == ($sql == "pgsql" ? "table" : "InnoDB")
? "~ $val"
: $val
));
if (isset($sums[$key])) {
// ignore innodb_file_per_table because it is not active for tables created before it was enabled
$sums[$key] += ($table_status["Engine"] != "InnoDB" || $key != "Data_free" ? $table_status[$key] : 0);