Du kan använda strängfunktioner (särskilt substr ) i mysql:https://dev.mysql.com /doc/refman/5.0/en/string-functions.html