📜  php mysql 更新表中所有行的新值 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.340000             🧑  作者: Mango

代码示例2
$idresult = $conn->query("SELECT id FROM pictures");

while ($row = $idresult->fetch_assoc()){
   mysqli_query($conn, "UPDATE pictures SET UniqueKey = '$UniqueKey' WHERE id = " . $row['id'];
}