update a table content mysql code example
Example 1: update all rows mysql
UPDATE tableName SET columnName = yourValue;
#to update multiple columns:
UPDATE tableName SET column1 = value1, column2 = value2; #and so on
Example 2: php mysql update all rows in table new values
$idresult = $conn->query("SELECT id FROM pictures");
while ($row = $idresult->fetch_assoc()){
mysqli_query($conn, "UPDATE pictures SET UniqueKey = '$UniqueKey' WHERE id = " . $row['id'];
}