for ($i = 0; $i <= 5; $i++) {
$sql = "SELECT `id` FROM `offices` WHERE `full_json` IS NULL LIMIT 1";
$result = $pdo_link->query($sql);
$id = $result->fetch()['id'];
echo $id . "\r\n";
$sql = "UPDATE `offices` SET `full_json` = 1 WHERE `id` = $id";
}
1
1
1
1
1
1