unnamed file

PHP

Keine Beschreibung eingegeben.

Guest

Download Edit

$neededslots = 60;
$ramneeded = 100 * $neededslots;
echo \"$ramneeded<br>\";
$stmt = $dbc->prepare (\"SELECT * FROM hosts\");
$stmt->execute ();
while ($row = $stmt->fetch ()) {
$ramfree = $row[\'ram\'] - 100 *
array_sum (explode (\'|\', $row[\'slots\']));
if ($ramfree > $ramneeded)
{
echo \'This Server will be used: \' . $row[\'ID\'] . \'<br>\' .
\"It has $ramfree free and will have \" .
($ramfree - $ramneeded) . \' free<br>\';
break;
}
echo $ramfree;
}