Cannot sort twice on a column when the table name contains accents

This commit is contained in:
Marc Delisle
2008-09-11 17:03:49 +00:00
parent 0a1a6c8bcc
commit b2a2454f20
3 changed files with 10 additions and 5 deletions

View File

@@ -1589,9 +1589,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
if ($seen_order) {
$seen_order_by = TRUE;
// here we assume that the ORDER BY keywords took
// exactly 8 characters
$unsorted_query = substr($arr['raw'], 0, $arr[$i]['pos'] - 8);
// Here we assume that the ORDER BY keywords took
// exactly 8 characters.
// We use PMA_substr() to be charset-safe; otherwise
// if the table name contains accents, the unsorted
// query would be missing some characters.
$unsorted_query = PMA_substr($arr['raw'], 0, $arr[$i]['pos'] - 8);
$in_order_by = TRUE;
$order_by_clause = '';
}