$neededslots = 60;
$stmt = $dbc->prepare(\"SELECT * FROM hosts\");
$stmt->execute();
while ($row = $stmt->fetch()) {
while(!isset($ok)) {
$slots = explode(\'|\',$row[\'slots\']);
$slots = array_sum($slots);
$usedram = 100*$slots;
$ramneeded = 100*$neededslots;
echo $ramneeded.\"
\";
$ramfree = $row[\'ram\'] - $usedram;
if($ramfree > $ramneeded) { $ok = $row[\'ID\']; echo \'hello \'.$row[\'ID\'].\'
\'; }
echo $ramfree;
}
}