PHP.“INSERT INTO” run twice via PHP mysqli_query!

Zeratul

New Member
\[code\]for($j = 0 ; $j < 87; $j++){ echo $j.'<br/>'; $unique = mt_rand(0,100000000); $insert_data = 'http://stackoverflow.com/questions/3804907/INSERT INTO uniques(uniq) VALUES ("'.$unique.'")'; mysqli_query($conn , $insert_data); echo $unique.'<br />';}\[/code\]I just want to insert random number into table uniques. But something wrong with above code.It worked fine when total loop under 86 and got twice insert when looping above 86.Thank you very much!I don't mean I got duplicate random number. But it seems the "INSERT INTO" run twice in my php code!
 
Back
Top