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
# --------------------------------------------------------
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
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