
February 22nd, 2007, 02:48 PM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 22,309
Time spent in forums: < 1 sec
Reputation Power: 25
|
|
|
Sorting Column Data with PHP
Please help me on this issue.
I am trying to sort 2 columns both ways (asc and desc)
Right now, I only got it working one way.
What am I doing wrong?
THANKS!!
php Code:
Original
- php Code |
|
|
|
if (! isset ($_GET['orderby'])) { $orderby = 'POSTED_DATE'; $order = 'DESC'; } else { $orderby = $_GET['orderby']; $order = $_GET['order']; } <TD><a href=index.php?orderby=POSTED_DATE&order=desc>Date</a></TD> <TD><a href=index.php?orderby=FIRSTNAME&order=desc><Posted By</a></TD>
|