Of course you should really have a data model that knows what it wants to sort by and constructs the query appropriately. The table- drawing code can then ask the data-model for heading-names and sort- order details. It's more work up-front, but you only have to do it once and then you can generate new table layouts very easily.
Can you recommend some literature for this subject? Tutorials or something online? I know what a data model is. But I have no idea how "the table-drawing code can then ask the data model"....
Many thanks! Stef ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster