# write out title
if ($sort_order == "asc") {$sort_title = "Ascending";} else {$sort_title = "Descending";}
echo "<p><b>Data Set Sorted By $sort_field in $sort_title Order</b></p>\n";
# write out table heading
echo "<table width='75%' border='1' cellspacing='0' cellpadding='0' align='center' bgcolor='#CCCC99'>\n";
echo "<tr>\n";
The following is at the beginning of the script:
# get sort order (if any) passed to script $sort_field = $_REQUEST['sort_field']; if (! $sort_field) {$sort_field = "(ssa1202.total/vapall.vapall)*100";} $sort_order = $_REQUEST['sort_order']; if (! $sort_order) {$sort_order = "desc";}
Thanks. **************** On 12 Mar 2004 00:12:41 -0000, David Robley <robleyd@xxxxxxxxxxxxxx> wrote:
kc68@xxxxxxxxxxx wrote in news:opr4pq3cqowxq73o@xxxxxxxxxxxxxxxx:
How can I have the explanation above a php table on a sort come out as something different than the sort coding? For example, the sort line below results in the following text above the sorted table: "Data Set Sorted by (ssa1202.total/vapall.vapall)*100 in Descending Order". I'd prefer simply "Data Set Sorted by Percent in Descending Order." I tried naming the sort field "as Percent" but that didn't change anything.
echo "<td><div align='center'><font size='3'><b>Percent<a href='ssa1202.php?sort_field=(ssa1202.total/vapall.vapall)*100&sort_ord er=desc' target='_self'><font size='2'><br>Sort</a></b></font></div></td>\n";
Ken
Without seeing the code that produces the text above the table, its a bit hard to give any suggestions.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php