Gossamer Forum
Home : Products : DBMan : Customization :

Make records appear first

Quote Reply
Make records appear first
Right now my database is set so the first records appear at the top of the list when someone does a search. I just put the ID in descending order. I would like to have other records that are more important show up first and then have them followed by the records that were entered first. So I would like to order the data by 2 fields when a search is done. Is this possible? If it is could someone explain it to me in very elementary terms as I am technically challenged.....

Thanks!! and thankyou Elliot for your help earlier.
Quote Reply
Re: Make records appear first In reply to
All you have to do is add the following codes to your query string (like in the List All option):

Code:
sb=2&so=descend

sb = Sort By (designated by field number)
so = Sort Order (designated by descend or ascend)

You can also add hidden fields in your search form, like the following:

Code:
<input type="hidden" name="sb" value="2">
<input type="hidden" name="so" value="descend">

Hope this helps.

You're welcome...although I can't remember what exactly I helped you with...

Smile

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Make records appear first In reply to
Yes thanks. This will put field 2 in descending order but what if I need it to put field 2 in descending order and then field 5 should be in ascending order. Will it do this and sort by the 2 fields instead of just one. Can it look at field 2 and if it places it in descending then attempt to put 5 in ascending as much as possible?
Quote Reply
Re: Make records appear first In reply to
Nope! DBMAN only cleanly sorts ONE field at a time per search form, per link, etc. There are a couple decent attempts at sorting multiple fields in this Forum, but not ideal.

Sorry.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Make records appear first In reply to
Thanks for your wisdom.