I want to create primary key like this…
http://www.example.com/download?d=NAPHMPWI
…i.e. the ?d=NAPHMPWI.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make the primary key an auto-incrementing integer, as most databases support out of the box. Display it as a string for your URLs by converting it to base 36 (which uses digits 0-9 and A-Z).
And convert URLs to database identifiers by converting from base 36 to base 10: