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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Strange behavior on ordering collection

Started by Thierry 9 years ago · 2 replies · 510 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 Thomas, 1 week ago
2 57 14 hours ago
Support · by Anna, 3 days ago
2 65 17 hours ago
Support · by Justin Young, 18 hours ago
1 33 18 hours ago
Support · by Duc , 1 week ago
2 68 5 days ago
Support · by Colin Hume, 1 week ago
2 60 6 days ago