CodeIgniter-MY_Model icon indicating copy to clipboard operation
CodeIgniter-MY_Model copied to clipboard

Error with order by ; sorting main results by relation value

Open mrelliot69 opened this issue 1 year ago • 0 comments

I'm having a problem sorting the results with a column from my has_many relations; Already check the code, and found something's that i don't understand,

Why the order_by variable is reseted on the loop if after the loop is where the result will be sorted using the sort function? On the _build_sorter function how it works, because if the result have more than one position the arrayA will have multiples position, therefore the arraya[orderby] will not work, since is a multidimensional array

image image image

mrelliot69 avatar Apr 20 '23 14:04 mrelliot69