Forum Moderators: coopster
You can probably already guess the problem I'm having with this. When I read the sales order out of the database, it will be read out of order, ie,
1
10
11
12
2
20
21
3
4
5
I understand using natsort will resolve this problem. But the problem lies in the database, not in the actual sorting. In other words, I'm not reading these lines from an array where I might apply natsort. So my question would be, how do I sort this out (pun intended) with the database (MySQL).
The first solution I've come up with is to make my field (SOD) a text field, default '00000', and superimpose the line item number. That should work... and would be easier than trying to populate an array and re-sort everything.
Is this the sort of thing (another pun intended) you've dealt with, and what was your solution?
gracias