Dear Sergey,
I have a MySQL field column called "Birim Fiyat". I want to order by ascending or descending but it is not ordering correctly. Ypu can see from the pictures. It orders as a string not as a number.
Ordering is like this.
Ascending:
10
100
125
...
750
...
90
Descending:
90
85
750
70
67,5
....
Bug of ordering mysql field column
- support
- Site Admin
- Posts: 6231
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Bug of ordering mysql field column
it's because
is string, not number.67,5
-
- Posts: 653
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Bug of ordering mysql field column
67,5 is not a string, it is because of number format. You can see the number format from the screenshot. We use dot (.) for thousand separator and comma (,) for decimal separator.
- support
- Site Admin
- Posts: 6231
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: Bug of ordering mysql field column
Then probably for some values formula return empty string or null. Formula should return 0 or other number.
I other case mysql will think it's string and values will be ordered as string.
Can you show me your formula?
I other case mysql will think it's string and values will be ordered as string.
Can you show me your formula?
-
- Posts: 653
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Bug of ordering mysql field column
I have used IFNULL function in the formula and the problem exists.
-
- Posts: 653
- Joined: 30 Oct 2017, 11:24
- Name: Enis Hemedoglu
- Location: Istanbul, Turkey
- Company Name: SCORE DANISMANLIK
- Contact:
Re: Bug of ordering mysql field column
I have changed the formula like this and the problem solved. Thanks.
Code: Select all
IF([797]=508,IFNULL([798]+0,0),IFNULL([799]+0,0))