Folks,
I have this little sort routine
##
## UGLY HACK to sort the dates correctly
##
($name, $date, $time, $wonid, $cheat, $server) = split(/\|/, $a);
($wday,$month,$mday,$year) = split(/\s+/, $date);
($hour,$min,$secs) = split(/:/, $time);
$TIME = timelocal($secs,$min,$hour,$mday,$mon,$year);
($name2, $date2, $time2, $wonid2, $cheat2, $server2) = split(/\|/, $b);
($wday2,$month2,$mday2,$year2) = split(/\s+/, $date2);
($hour2,$min2,$secs2) = split(/:/, $time2);
$TIME2 = timelocal($secs2,$min2,$hour2,$mday2,$mon2,$year2);
##
##
##
# sort values
if ($table_sort eq "adate") { return $TIME <=> $TIME2; }
elsif ($table_sort eq "ddate") { return $TIME2 <=> $TIME; }
elsif ($table_sort eq "name") { return $name <=> $name2; }
elsif ($table_sort eq "wonid") { return $wonid <=> $wonid2; }
elsif ($table_sort eq "cheat") { return $cheat <=> $cheat2; }
}
yes, it is ugly (needs clean up)
not sure why, but the output is not sorted as I would expect. I thought it
would sort on the unix time and put thing in order, but it does not. the
dates are sorted by the day of the month *boggle* for out put go here
http://www.sampier.com/cheaters/busted.html
Regards,
Ron
Ronald J. Yacketta
Principal Consultant
Ciber, INC
345 Woodcliff Dr.
Fairport, NY 14450
-----------------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.
Any review, retransmission, dissemination or other use of, or taking of
any action in reliance upon, this information by persons or entities other
than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the
material from any computer.
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]