Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Resort Table

by tcf22 (Priest)
on Oct 27, 2003 at 19:54 UTC ( [id://302498]=note: print w/replies, xml ) Need Help??


in reply to Resort Table

I think this may be what you are looking for:
my $sort_order = $q->param('sort_order'); my $order = $q->param('order'); print '<tr>'; foreach(@column_headings){ print "<td><A href=\"pastRequests.pl?order=$_&sort_order=" . (($_ eq $order && $sort_order eq 'desc') ? 'asc' : 'desc') . "\">$_</a></td>"; } print '</tr>'; my @records = ##Get your data, maybe an array of hashes?? @records = reverse(@records) if($sort_order eq 'asc'); foreach(@records){ ##Output records }

- Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://302498]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found