Thanks for your reply. Unfortunately, just to make things easier, product codes do not necessarily have 2 letters at the start:
are all examples of product ids...
I'm wondering if I should change the table:
CREATE TABLE `catalogue` (
`prefix` VARCHAR(3) NOT NULL,
`suffix` VARCHAR(5) NOT NULL,
PRIMARY KEY(`prefix`, `suffix`)
Then the query would something like:
SELECT `prefix`+`suffix` AS `id` FROM `catalogue` ORDER BY `prefix` AND `suffix`
What do you think?