0) { for ($ti=1; $ti <= $Twnb; $ti++) { if ($itemsW[$ti] > 0) { $itemsWprice[$ti] = $pw[$ti]; } } for ($ti=1; $ti <= $Tanb; $ti++) { if ($itemsA[$ti] > 0) { $itemsAprice[$ti] = $pa[$ti]; } } RecrunchStorage(); $result = mysql_query("UPDATE Buildings SET Storage='$storage' WHERE Id=$v"); } ?>