fixing spoolsize to handle deleted DB

This commit is contained in:
Benjamin Sonntag 2018-02-28 17:32:52 +01:00
parent f392ad11a0
commit 13144a162a
1 changed files with 2 additions and 2 deletions

View File

@ -30,13 +30,13 @@ if ($db->query("SELECT uid,login FROM membres;")) {
} }
echo "\n---------------------------\n Generating size-cache for MySQL databases\n\n"; echo "\n---------------------------\n Generating size-cache for MySQL databases\n\n";
// We get all hosts on which sql users' DB are // We get all hosts on which sql users' DB are
$r=$db->query("select * from db_servers;"); $r=$db->query("select * from db_servers;");
$allsrv=array(); $allsrv=array();
while ($db->next_record()) { while ($db->next_record()) {
$allsrv[] = $db->Record; $allsrv[] = $db->Record;
} }
$db->query("DELETE FROM size_db;");
$tab=array(); $tab=array();
foreach($allsrv as $c) { foreach($allsrv as $c) {
$tab=$mysql->get_dbus_size($c["name"],$c["host"],$c["login"],$c["password"],$c["client"]); $tab=$mysql->get_dbus_size($c["name"],$c["host"],$c["login"],$c["password"],$c["client"]);