Is there a way i could make the unique id (primary key) in Mysql generate with numbers and letters to keep the id as short as possible? If I cant do this in Mysql how could i get PHP to generate this? Thanks 🙂
Share
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.
Encoding as Base 36 is a good choice for this as it utilises 0-9 A-Z and so is compact.
You can leave mysql using integers and translate between the two in PHP, or derive a base 36 value from an incrementing id + trigger.