UPDATE Prod SET result = w*eft/(SELECT Forc.rft * (1 + Forc.cos / 10) from Forc where Forc.id=Prod.id)
<?php
$limit = 10000;
$offset = 0;
do {
$data = $db->query("SELECT * FROM `tbl` ORDER BY `id` ASC LIMIT $limit OFFSET $offset")->fetchAll();
$offset += count($data);
}
while(count($data));