num_rows > 0) {
$result = $result->fetch_assoc();
$last_commit = $result["last_commit"];
}
$result = mysql_run_query(
"SELECT MAX(`build_assignments`.`return_date`) AS `last_return`" .
" FROM `build_assignments`"
);
if ($result -> num_rows > 0) {
$result = $result->fetch_assoc();
$last_return = $result["last_return"];
}
$result = mysql_run_query(
"SELECT MAX(`binary_packages_in_repositories`.`last_moved`) AS `last_moved`" .
" FROM `binary_packages`" .
" JOIN `binary_packages_in_repositories` ON `binary_packages_in_repositories`.`package`=`binary_packages`.`id`" .
" JOIN `build_assignments` ON `binary_packages`.`build_assignment`=`build_assignments`.`id`" .
" WHERE `binary_packages_in_repositories`.`last_moved`>`build_assignments`.`return_date`"
);
if ($result -> num_rows > 0) {
$result = $result->fetch_assoc();
$last_moved = $result["last_moved"];
}
print_header("Build Master Status");
if (isset($last_commit))
print " latest package source is from " . $last_commit . ".
\n";
if (isset($last_return))
print " latest built package is from " . $last_return . ".
\n";
if (isset($last_return))
print " latest package move was on " . $last_moved . ".
\n";
print_footer("Copyright © 2018 Erich Eckner.");