Define sort order for sorting tables (RFE #971314).

This commit is contained in:
Michal Čihař
2004-06-15 17:25:48 +00:00
parent 84c19c0f42
commit fc4ba26ba2
2 changed files with 10 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ $Source$
query frame when possible. query frame when possible.
* libraries/display_export.lib.php: Fix broken choice switching. * libraries/display_export.lib.php: Fix broken choice switching.
* tbl_change.php: Fix wrong path to image. * 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 <me@derrabus.de> 2004-06-15 Alexander M. Turek <me@derrabus.de>
* libraries/config_import.lib.php: The default settings should be merged. * libraries/config_import.lib.php: The default settings should be merged.

View File

@@ -66,8 +66,11 @@ if (isset($message)) {
if (isset($submitorderby) && !empty($order_field)) { if (isset($submitorderby) && !empty($order_field)) {
$sql_query = 'ALTER TABLE ' . PMA_backquote($table) $sql_query = 'ALTER TABLE ' . PMA_backquote($table)
. ' ORDER BY ' . PMA_backquote(urldecode($order_field)); . ' ORDER BY ' . PMA_backquote(urldecode($order_field));
if (isset($order_order) && $order_order == 'desc') {
$sql_query .= ' DESC';
}
$result = PMA_DBI_query($sql_query); $result = PMA_DBI_query($sql_query);
PMA_showMessage($strSuccess); PMA_showMessage($result ? $strSuccess : $strFailed);
} // end if } // end if
@@ -115,6 +118,10 @@ if (PMA_MYSQL_INT_VERSION >= 32334) {
unset($columns); unset($columns);
?> ?>
</select>&nbsp;<?php echo $strSingly . "\n"; ?> </select>&nbsp;<?php echo $strSingly . "\n"; ?>
<select name="order_order">
<option value="asc"><?php echo $strAscending; ?></option>
<option value="desc"><?php echo $strDescending; ?></option>
</select>
</td> </td>
<td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right"> <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right">
<input type="submit" name="submitorderby" value="<?php echo $strGo; ?>" style="vertical-align: middle" /> <input type="submit" name="submitorderby" value="<?php echo $strGo; ?>" style="vertical-align: middle" />