From fc4ba26ba268e1c8fa30d3700f9af3ccd2016078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 15 Jun 2004 17:25:48 +0000 Subject: [PATCH] Define sort order for sorting tables (RFE #971314). --- ChangeLog | 2 ++ tbl_properties_operations.php | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 60f0d37b7..4318e2058 100755 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ $Source$ query frame when possible. * libraries/display_export.lib.php: Fix broken choice switching. * tbl_change.php: Fix wrong path to image. + * tbl_properties_operations.php: Define sort order for sorting tables + (RFE #971314). 2004-06-15 Alexander M. Turek * libraries/config_import.lib.php: The default settings should be merged. diff --git a/tbl_properties_operations.php b/tbl_properties_operations.php index 1d6fa24ef..b90f79435 100644 --- a/tbl_properties_operations.php +++ b/tbl_properties_operations.php @@ -66,8 +66,11 @@ if (isset($message)) { if (isset($submitorderby) && !empty($order_field)) { $sql_query = 'ALTER TABLE ' . PMA_backquote($table) . ' ORDER BY ' . PMA_backquote(urldecode($order_field)); + if (isset($order_order) && $order_order == 'desc') { + $sql_query .= ' DESC'; + } $result = PMA_DBI_query($sql_query); - PMA_showMessage($strSuccess); + PMA_showMessage($result ? $strSuccess : $strFailed); } // end if @@ -115,6 +118,10 @@ if (PMA_MYSQL_INT_VERSION >= 32334) { unset($columns); ?>   +