PHP randomly comes up with a combination of numbers and letters to insert into the database, and then judges what to do if the database inside is recycled and then inserted into the database.

  mysql, question

PHP inserts a random code into the database according to ID, and then judges that if the random code already exists in the database inside, it will be inserted into the database one at a time.
图片描述

while (true) {
 //Generate Random Numbers
 //Judge whether the database exists or not
 If ($noFount) {///if it does not exist
 //Insert database
 break;
 bracket
 bracket