1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 15:16:44 +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

@@ -250,10 +250,12 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
}
function table_status($name = "") {
global $connection;
$return = array();
foreach (get_rows("SELECT name AS Name, type AS Engine FROM sqlite_master WHERE type IN ('table', 'view')" . ($name != "" ? " AND name = " . q($name) : "")) as $row) {
$row["Oid"] = "t";
$row["Auto_increment"] = "";
$row["Rows"] = $connection->result("SELECT COUNT(*) FROM " . idf_escape($row["Name"]));
$return[$row["Name"]] = $row;
}
foreach (get_rows("SELECT * FROM sqlite_sequence", null, "") as $row) {