I saw this post but didn't understand if this was the same issue.
My database can be sorted on each column. Once the db is sorted, how do I maintain that order after my next query?
For example:
Order db by age:
sprintf(sql, "select * from Customer_Table ORDER BY age_ID LIMIT 100 OFFSET %s;", offset);
then the user looks at the next 100 customers
sprintf(sql, "select * from Customer_Table LIMIT 100 OFFSET %s;", offset); //next offset
The returned data is no longer ordered by age. How would I keep the last sort throughout the next query?
Do I have to pass in a variable to maintain state or does the database have some function for recalling it's last state?