Q:

Is there a way to get Mysql to make the unique ID generate with letters and numbers? (or PHP)

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 :)

A:

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.

