Gossamer Forum
Home : Products : DBMan : Installation :

Sorting results by ID

Quote Reply
Sorting results by ID
I would like to make the results of my search to appear in order with the record with the highest ID to appear first, rather than what's happening now with the record with the lowest ID appearing first.

Can anybody help?

Thanks,
Tom
Quote Reply
Re: Sorting results by ID In reply to
Do you want it to sort that way every time with a search? Are you talking about the search form?

If yes to both of those, add the following to sub html_view_success, after the <form ... line:

Code:
<input type="hidden" sb="the number of your ID field">
<input type="hidden" so="descend">

If you have a search form on a static html page, you can also add those fields to the form.

If you want to make the "List All" link sort as you requested, add the following to the link in sub html_footer:

Code:
&sb=the number of your ID field&so=descend



------------------
JPD