I have an application, which will require around 200K batch IDs to be generated every year.
I first thought of using uniqid()
to generate batch IDs, but this will return be string, which will take up huge space in database, as compared to integer.
Hence, my question is, will random_int(1, 2147483647)
be relied upon to generate unique numbers?
FYI, generally 2147483647
is PHP_INT_MAX
.
Aucun commentaire:
Enregistrer un commentaire