Forum Moderators: coopster
The client wants something in front of the ID. Such as..if someone registers their client ID would be:
MDWG14W005
MDWG14W006
etc.
So there would be a part that never changes, and the end characters unique. How would I go about implementing this? Would I do it within the php page or on the mysql side of things.
Thanks.
You can accomodate the request for pretty product numbers a couple ways. If you're using a new version of MySQL you can use a trigger [dev.mysql.com] to create the pretty product numbers based on the numerical key.
It could be seen as a waste having a separate field for the pretty id, but it's probably easier that way than always using PHP to prepend the alphanumeric before the "real" id. More flexible, too, for when the client whats to change the way the product numbers work.
[edited by: jatar_k at 6:20 pm (utc) on April 19, 2005]
[edit reason] added proper link [/edit]