PHP:循环访问UPDATE查询所涵盖的每个项目

I've got a mysql UPDATE query:

$updateExpries = "UPDATE table SET 
                   field = '$value'
                   WHERE oneField != '$anotherValue'";

How could I get all items that have just been updated and update another field for each of those items individually?

You can update more than one field in a table:

UPDATE table 
SET 
    field = 'value', 
    field2 = 'another value', 
    field3 = 'third value' 
WHERE oneField != 'term'
if($res = $sqli->query($updateExpries)) {
    while ($row = $res->fetch_assoc()) {
        $fieldFromQuery = $row["someField"];
        $newQuery = "UPDATE table SET newfield = '$fieldFromQuery' WHERE someotherField != '$Valuewhaterver'";
        ...
    }
} else handle error;

Or something similar if you aren't using sqli