RE: Ascending and Descending records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




include a link(s) at the top of the column(asc/desc) and pass that value back to the server. then use that value to sort the column


link = <a href='<?=$_SERVER['PHP_SELF']?>?col=colname&sort=asc'>Asc</a>

then on the server

$col = $_REQUEST['col'];
$sort= $_REQUEST['sort'];


sql= "select * from tableName [where] order by $col $sort";

bastien

From: "Aaron Todd" <aaloki88@xxxxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  Ascending and Descending records
Date: Tue, 5 Oct 2004 12:35:32 -0400

I have a page that shows data from a MySQL database in a table form. I'd
like to give this page the ability to be able to sort a column when the user
clicks on the header cell that contains the name of the column. I'd also
like the ability to do both Ascending and Descending with the same link much
like just using Excel. Does anyone know of a good source for accomplishing
this?


Thanks,

Aaron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_________________________________________________________________
Designer Mail isn't just fun to send, it's fun to receive. Use special stationery, fonts and colors. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux