3

Ascending alphabetical sorting in a Views string field works like this:

1
2
3
a
A
b
B

But I want it like this:

1
2
3
A
B
a
b

Is there any way to do this?

2

What you're want to do is a sort by a character's byte value. MySQL has a function for this, BINARY(), which you could use in your ORDER BY criteria (e.g. ORDER by BINARY(title)).

Drupal Views doesn't have any default sorting handlers that use this function, so the only way to do it in views is by creating your own custom sort handler.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.