Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Strange behavior on ordering collection

Started by Thierry 9 years ago · 2 replies · 618 views
9 years ago

Hello,

I get an annoying problem. I set a field (price with float type [1.16]) in header.
In php code i make :
$collection->order('header.price',"asc");

All prices are not sort in "asc" direction. I got 2.44 before 1.497 😦
(it's seems to work well with desc...)

PHP command gettype give double for header.price type. Good for sorting, but does not work.

Any idea to workaround this strange behavior ?

Thanks for help,

Regards.

Thierry

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 19 hours ago
1 56 12 hours ago
Support · by gtx, 1 week ago
4 229 2 days ago
Support · by Paul Hodges, 2 weeks ago
13 277 5 days ago
Support · by Anna, 3 weeks ago
9 335 1 week ago
Support · by TomW, 2 weeks ago
4 189 2 weeks ago