Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

PHP Generating unique txID or Using auto_increment in SQL

I am just curious as to why others generate unique strings or ID for transactions or orders when they can just use the primary key in SQL.
Is it recommended to generate id like this 111834039007163223, or is it okay to just use the primary key in SQL generated using auto_incement?
I always see websites or applications using this kind of ID. Can someone please enlighten me on how would I benefit from this or how should I properly use this on my project? I am planning to use this on the transactions on our project.
 
for me i have used both, if i can i use the ID in the database under auto increment i will but i would assume its easier to explain to a newbie how to use your code to Auto Increment rather then trying to explain how to setup a sql database properly lol
 

Buy us a coffee!

Back
Top Bottom