Forums

This topic is locked

Is there any way we can do multiple sorting?

Posted 31 Mar 2003 18:42:50
1
has voted
31 Mar 2003 18:42:50 James Lee posted:
Hello Guys,

Just want to ask you regarding sorting. Let's say I have 4 fields, Name/Address/Postal Code/Telephone and I manage to retrieve the information from a database using SQL. So let's just say I have 5 records in a table. I want to create a sort where if I press a link on the Name, it will automatically sort for me according to names. If I click on the Address header, then it will sort for me according to Address. Right now, using SQL, it only allows you to sort using the Order By clause which is too limited because it only sorts to 1 field, but what if I want to provide flexibility to my customer in them having to click on a certain field and sort according to that field. Is that possible?

Replies

Replied 31 Mar 2003 19:25:02
31 Mar 2003 19:25:02 Iain Stewart replied:
Hi there,
sort by a url parameter, use a default value for your initial sort, then use your table links to reload the page with a new url parameter this should sort using whatever you want.

hope this helps

Iain

head hurts, 'mental note to self, stop banging head !'

Reply to this topic