Android Question Sorting Mysql data the second time

toby

Well-Known Member
Licensed User
Longtime User
My app gets data (ID, name, creationDate) sorted by a creationDate, in the form of list of maps, from mysql using php. I then create a corresponding list of arrays, which is used to populate a b4xTable.

Now I need to sort the same data by ID column instead. I know that I could query mysql to get another copy of data sorted by ID column, and I'm wondering whether there is an easy way to avoid the second round trip to the remote server.

Thanks in advance for your helps!
 

TILogistic

Expert
Licensed User
Longtime User
sort:

B4XTable
.InternalSortMode
B4X:
B4XTable1.AddColumn("Name", B4XTable1.COLUMN_TYPE_TEXT).InternalSortMode = "DESC" 'or "ASC"
'or
Dim c As B4XTableColum = B4XTable.AddColumn(...)
c.InternalSortMode = "ASC"

Map

Array (QuickSort)
 
Last edited:
Upvote 0
Top