Welcome Guest, Not a member yet? Register   Sign In
Orderby: uppercase Z > lowercase a
#1

[eluser]PeterGreffen[/eluser]
Hello,

An "ORDER BY" like ($this->db->orderby('name'));
gives me this result:

1. Adam
2. Zora
3. anna
4. zanzibar
5. ...

Seems like the uppercases are higher ranked than the lowercases...
Does anyone know how to solve this?

Thank you!
P.
#2

[eluser]n0xie[/eluser]
Google, first hit
#3

[eluser]PeterGreffen[/eluser]
N0xie, thanks.
I will use that solution, although I prefer to use the CI way of querying...$this->db->orderby(‘name’).
But thanks again!
P.
#4

[eluser]smilie[/eluser]
$this->db->orderby(‘LOWER "name"’)

Maybe... not tested :-)

Cheers,
Smilie
#5

[eluser]teampoop[/eluser]
Since it's a function, you want to put it in parens

Code:
$this->db->order_by('LOWER(name)');
#6

[eluser]PeterGreffen[/eluser]
Thanks all!




Theme © iAndrew 2016 - Forum software by © MyBB