$neededslots = 60;
$ramneeded = 100 * $neededslots;
echo \"$ramneeded
\";
$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\'] . \'
\' .
\"It has $ramfree free and will have \" .
($ramfree - $ramneeded) . \' free
\';
break;
}
echo $ramfree;
}