This topic is locked

Number sort

11/14/2006 7:43:32 AM
PHPRunner General questions
M
mmponline author

When I click the sort heading on a number (or currency) field I get the following result:
10

100

200

85

95 etc.
ISO
10

85

95

100

200 etc.
How do I solve this?
I tried setting the field to currency, with the same problem!

T
thesofa 11/14/2006

Is there any way you can introduce a leading zero to the number format, this will solve the sorting problem.

Try this post here to see if it can help you.

All I searched for was PHP leading zero

Alexey admin 11/14/2006

Stephan,
your field in the database should have numeric type to be sorted properly.
Looks like you have CHAR or VARCHAR there.

Change it to INT, DOUBLE, NUMBER etc

M
mmponline author 11/14/2006

Sorted out, thanks. Quite logical once you know it.
I'm having another problem that the field does not display as Currency on my "real project". Will send printscreens.