Answer the question
In order to leave comments, you need to log in
The principle of generating an id for an order?
By what principle is it worth generating an order number and at the same time writing it to the database?
Answer the question
In order to leave comments, you need to log in
Id, which is the primary key in the orders table, is sufficient
if an order can be viewed by its id on the Internet without registration and SMS, and it should not be possible to view other people's orders, I would use the current date and a 9-character random number when generating the id, that is,
20200728123456789
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question