I'm making a serial system for my site, and it using the MySQL CHAR_LENGTH function to get all the serials with the matched length. Thing is, it's returning strings that are more than I'm looking for. I've also tried with CHARACTER_LENGTH and LENGTH, having no impact on the result :/.
This is my I/O:
SELECT serials.code
FROM serials
WHERE CHARACTER_LENGTH(code) = 12
These are the results:
niels-er-sej
KUVX-21-40
KUVX-21-40
As you can see, the last two, are only 10 characters, yet they show up when I search for 12?
I've added a picture of the Character lengths as request: