Hi Sergey,
MySQL query fields are not sorted correctly in tables if they are only numbers.
Apparently a text sort is applied, which makes perfect sense. It would be worth checking whether it is not possible to specify in the field options whether this is a pure number. This would then allow the correct sorting to be applied to each field.
I have included it under errors because it is a number field and the numbers are not sorted correctly at the moment.
Kind regards
Christoph
MySQL query fields are not sorted correctly
-
- Posts: 59
- Joined: 18 Feb 2023, 16:44
- Name: Christoph Berger
- Location: Steffisburg, Switzerland
Re: MySQL query fields are not sorted correctly
Like : 0, 1, 10, 11, 2, 3 ?
Using Rukovoditel since 2022 --- v3.4 (with extension) in French on PHP 8.2
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
I keep the French translation up to date
I'm trying to help you (+10 years experience in html, css, php, sql, JS/jquery, python)
-
- Posts: 59
- Joined: 18 Feb 2023, 16:44
- Name: Christoph Berger
- Location: Steffisburg, Switzerland
Re: MySQL query fields are not sorted correctly
Yes, exactly!
Is there a solution?
Is there a solution?
- support
- Site Admin
- Posts: 6222
- Joined: 19 Oct 2014, 18:22
- Name: Sergey Kharchishin
- Location: Russia, Evpatoriya
Re: MySQL query fields are not sorted correctly
Open phpmyadmin and change column type to Float to this field, if this field contain only numbers.
By default this filed type is string that is why it sorts as string.
So find table app_entity_X (X - is ID of entity)
And in table find column field_Y (Y - is ID of your field)
Backup first before any changes in db.
By default this filed type is string that is why it sorts as string.
So find table app_entity_X (X - is ID of entity)
And in table find column field_Y (Y - is ID of your field)
Backup first before any changes in db.
-
- Posts: 59
- Joined: 18 Feb 2023, 16:44
- Name: Christoph Berger
- Location: Steffisburg, Switzerland
Re: MySQL query fields are not sorted correctly
THANK YOU, works perfectly!