I'm trying to generate a unique hash for all the users in the Database; Here is my code:
<?php
include("php/connect.php");
$sql = "SELECT id FROM user";
while ($id = mysqli_fetch_assoc(mysqli_query($conn, $sql))) {
$new_hash = md5(uniqid(rand(), TRUE));
$sql2 = "INSERT INTO user (hash) VALUE ('$new_hash') WHERE id = $id['id']";
mysqli_query($conn, $sql2);
}
?>
Every time I run it, I get the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in