Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php mysql update all rows in table random 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']);
}
 
PREVIOUS NEXT
Tagged: #php #mysql #update #rows #table #random #values
ADD COMMENT
Topic
Name
4+3 =