We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a sql function for natural order by
No response
I propose to add these sql functions to Dolibarr in order to have lists ordered in a natural order
natsort copie.txt
TRUC001 TRUC002 TRUC010
instead
TRUC001 TRUC010 TRUC002
you can test this sql functions with :
$sql.= " ORDER BY udf_NaturalSortFormat(".$sortfield.", 10, '.') ".$sortorder.";
remains to make these functions compatible with Postgresql... which is not currently the case in the creation syntax
The text was updated successfully, but these errors were encountered:
this is can be include in "order" function of DoliDB class with constant and parameter
Sorry, something went wrong.
Natural_sort_key is implemented in MariaDB since version 10.7 (but not in mysql) https://mariadb.com/kb/en/natural_sort_key/
@hansemschnokeloch @eldy maybe add a function in the meantime to use either the MariaDB function or the function I propose?
https://modern-sql.com/caniuse/natural_sort_key
@hansemschnokeloch @eldy maybe add a function in the meantime to use either the MariaDB function or the function I propose? https://modern-sql.com/caniuse/natural_sort_key
Pb is that support will not be available on all installation. So i suggest to first introduce this as a hidden constant into the order method.
eldy
No branches or pull requests
Feature Request
Use a sql function for natural order by
Use case
No response
Suggested implementation
I propose to add these sql functions to Dolibarr in order to have lists ordered in a natural order
natsort copie.txt
TRUC001
TRUC002
TRUC010
instead
TRUC001
TRUC010
TRUC002
Suggested steps
you can test this sql functions with :
$sql.= " ORDER BY udf_NaturalSortFormat(".$sortfield.", 10, '.') ".$sortorder.";
remains to make these functions compatible with Postgresql...
which is not currently the case in the creation syntax
The text was updated successfully, but these errors were encountered: