I have a table that is looks like this. This is some of the general information when a user registers on my site.
+------------+------------+
| user_id | username |
| 312543 | Bobby |
| 543765 | Victoria |
+------------+------------+
I am just wondering, how would you generate a random unique number for user_id
? Let’s say a number between 1 and 100 that is not yet in the database. I want to accomplish this using PHP, not SQL.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…