Gossamer Forum
Home : Products : DBMan : Customization :

Re: Sort on.......

Quote Reply
Re: Sort on....... In reply to
Just me again.

I tried to email you directly, Don but the address isn't functioning.

Anyways, I neglected to mention you can also delete the sort subroutine in db.cgi as they are no longer needed with the above mod. I build the sort function on the fly to eliminate hard-coding the compare functions based on how many sorts there are.

Delete this
Code:
# These are the sorting functions used in &query.
# --------------------------------------------------------
sub alpha_ascend { lc($sortby{$a}) cmp lc ($sortby{$b}) }
sub alpha_descend { lc($sortby{$b}) cmp lc ($sortby{$a}) }
sub numer_ascend { $sortby{$a} <=> $sortby{$b} }
sub numer_descend { $sortby{$b} <=> $sortby{$a} }
sub date_ascend { &date_to_unix($sortby{$a}) <=> &date_to_unix($sortby{$b}) }
sub date_descend { &date_to_unix($sortby{$b}) <=> &date_to_unix($sortby{$a}) }


------------------
Don Mitchinson
Subject Author Views Date
Thread Sort on....... donm 6022 Sep 26, 1999, 2:13 AM
Post Re: Sort on.......
Eliot 5940 Sep 26, 1999, 8:14 AM
Post Re: Sort on.......
mitch 5943 Sep 27, 1999, 1:01 PM
Post Re: Sort on.......
mitch 5947 Sep 27, 1999, 1:44 PM
Post Re: Sort on.......
Eliot 5938 Sep 27, 1999, 1:50 PM
Post Re: Sort on.......
donm 5949 Sep 27, 1999, 3:48 PM
Post Re: Sort on.......
mitch 5960 Sep 28, 1999, 11:56 AM
Post Re: Sort on.......
mart 5963 Jan 19, 2000, 7:09 AM
Post Re: Sort on.......
mart 5971 Jan 22, 2000, 6:41 AM
Post Re: Sort on.......
mitch 5950 Jan 22, 2000, 8:31 AM
Post Re: Sort on.......
mitch 5949 Jan 22, 2000, 4:06 PM
Post Re: Sort on.......
mart 5941 Jan 22, 2000, 8:54 PM
Post Re: Sort on.......
mart 5960 Feb 7, 2000, 7:53 AM
Post Re: Sort on.......
mart 6017 Feb 7, 2000, 10:57 AM
Post Re: Sort on.......
mitch 5968 Feb 7, 2000, 4:31 PM
Post Re: Sort on.......
keienb 5949 Mar 29, 2000, 11:34 AM
Post Re: Sort on.......
anr 5952 Apr 2, 2000, 11:23 AM
Post Re: Sort on.......
anr 5951 Apr 2, 2000, 11:34 AM
Post Re: Sort on.......
anr 5955 Apr 2, 2000, 4:32 PM
Post Re: Sort on.......
JPDeni 5949 Apr 2, 2000, 7:36 PM
Thread Re: Sort on.......
anr 5934 Apr 2, 2000, 8:08 PM
Thread Re: Sort on....... still not searching accross
clive1 5878 Sep 21, 2000, 9:11 AM
Thread Re: Sort on....... still not searching accross
anr 5867 Sep 21, 2000, 6:36 PM
Thread Re: Sort on....... still not searching accross
anr 5872 Sep 21, 2000, 9:02 PM
Post Re: Sort on....... still not searching accross
clive1 5858 Sep 21, 2000, 11:44 PM