I have a field in table in mysql (5.5.49-0+deb7u1-log) database that a series of alphabets & numbers are saved in it in Farsi. I want to order “select query” output in the table, based on these series(field) in this way: From left to write: numbers in red box, then numbers in green box, then an alphabet in blue box, then numbers in orange box & finally an alphabet in the last box.(pic1) pic1
For example:
001/4پ….
001/4چ……..
001/4ل………
001/40الف…
001/40ب……
001/420ب….
002/1الف….
002/20 ب…
To do this, I’ve selected utf8_general_ci for collation field and the list was ordered except alphabets پ, ژ, گ, چ
that went to the end of the list; and when I put collation field on utf8_persian_ci
, alphabets get ordered properly but numbers get disorder.
The output is attached based on utf8_general_ci collations.(utf8_general_ci_pic,utf8_persian_ci_pic)
How should I fix this problem??