Howdy all,
I have written the following code to put in a random value into mysql. The “pin” field is set to UNIQUE, and I need this script to repeat itself until it has successfully inserted a record on $querypass.
[php]
{
$aa = better_urandom_rand(0xFFFFFFFE,0xFFFFFFFE);
$querypass = “INSERT INTO collision_test_pass (pin) VALUES ($aa)”;
$queryfail = “INSERT INTO collision_test_fail (pin) VALUES ($aa)”;
if (!mysqli_query($link, $querypass)) {
mysqli_query($link, $queryfail);
}
}[/php]
Could someone please point me in the right direction?