I have a table with 3 fields: id (auto_increment), name (string), x.
in my x field i want it to be kind of like a auto_increment but with letters and numbers being used. For example, if id field is 1, x will be "aaaa". if id is 2 x will be "aaab" and so on. the idea is that with for digits i could have a 14 million unique ids. can someone please help me out?
paullanesra
0
Newbie Poster
Recommended Answers
Jump to PostIf you use BIGINT with auto_increment it will give you 9,223,372,036,854,775,807 unique values.
http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html
It might save you some work trying to figure out triggers to just go with big int, unless you have another reason for the aaaa, aaab ids. If you have more …
All 5 Replies
blur0224
0
Light Poster
paullanesra
0
Newbie Poster
blur0224
0
Light Poster
paullanesra
0
Newbie Poster
paullanesra
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.