View Single Post
Old 09-26-2011, 08:01 AM   #12
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none


Perfect, sorting BOTH fields solves the issue.

(Before posting, I had tried sorting but only languages field. And I needed sorting #original_language too, because the database sorting thing you've just explained).

I've used a slight variant to your code:
Code:
{#original:'strcmp(list_sort(field('#original_language'),0,','),list_sort(language_strings(field('languages'),0),0,','), 'No', 'Yes', 'No')'}
I suppose that if I sorted before calling language_strings, I would get "Spanish, Latin" because of "esp, lat", which wouldn't match the alphabetically sorted "Latin, Spanish".

Last edited by arspr; 09-26-2011 at 08:10 AM.
arspr is offline   Reply With Quote