how to sort numeric
Inspired from a thread «how to search for only the first occurency ...», I tried something like «oldes book of an author»... and I made it ... almost.
As «oldest» is referring to my library, I search for that book with the lowest id of an author. I search book by author and sort them by id. But that sorting is alphabetic and therefore 1060 comes before 888.
In a template search I use
...
books_of_author = book_values ('id', searchstring, ',' , 99) ;
list_split (list_sort (books_of_author, 0, ','), ',', 'book_of_author_id');
...
Can someone help, to get the list of ids ordered numeric?
|