Affichage de la liste des tables dans les infos de base de données.
This commit is contained in:
parent
1b89b8c808
commit
5a5a2f1bcf
@ -66,6 +66,10 @@ else if ($conf->db->type == 'mssql')
|
|||||||
//$sqls[0] = "";
|
//$sqls[0] = "";
|
||||||
//$base=3;
|
//$base=3;
|
||||||
}
|
}
|
||||||
|
else if ($conf->db->type == 'sqlite') {
|
||||||
|
//$sql = "SELECT name, type FROM sqlite_master";
|
||||||
|
$base = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! $base)
|
if (! $base)
|
||||||
@ -169,6 +173,39 @@ else
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($base == 4)
|
||||||
|
{
|
||||||
|
print '<table class="noborder">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("TableName").'</td>';
|
||||||
|
print '<td>Rows</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$sql = "SELECT name, type FROM sqlite_master where type='table' and name not like 'sqlite%' ORDER BY name";
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$var=True;
|
||||||
|
while ($row = $db->fetch_row($resql)) {
|
||||||
|
|
||||||
|
$rescount = $db->query("SELECT COUNT(*) FROM " . $row[0]);
|
||||||
|
if ($rescount) {
|
||||||
|
$row_count = $db->fetch_row($rescount);
|
||||||
|
$count = $row_count[0];
|
||||||
|
} else {
|
||||||
|
$count = '?';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td>'.$row[0].'</td>';
|
||||||
|
print '<td>'.$count.'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user