When displaying a table, pma gives the option to sort after a certain
column. If a column is 'COUNT(*)' or 'SUM(var)' and you click on it, it
will be sorted ASC but if you click it again it still will be sorted ASC i.e.
it's not possible to let it sort DESC.
Logged In: YES
user_id=144058
Hi!
Can you give a try to the live demo. I remember I've fixed such
kind of bug but I'm not sure when...
Loc
Logged In: YES
user_id=210714
Bug still there in cvs.
Logged In: YES
user_id=418833
I could also reproduce this bug and ran into another one.
But I'll open a new report for this.
Logged In: YES
user_id=210714
The problem is that the brackets of the expression COUNT(*)
are not escaped before entering the regexp, so in
display_tbl.lib.php3, section 2.1.2, replace the $is_in_sort
line with:
$pattern = str_replace('\\', '\\\\', $fields_meta[$i]->name);
$pattern = str_replace('(','\(', $pattern);
$pattern = str_replace(')','\)', $pattern);
$is_in_sort = eregi('[[:space:]](`?)' . $pattern . '(`?)[
,$]',$sql_order);
Feedback?
Logged In: YES
user_id=210714
Merged.
Logged In: YES
user_id=144058
Hi!
Well this problem is the same than the one reported in bug
#605030 (Problems with [] in Tablename) : as soon as a there
is a special regexp character in the pattern we will face such
kind of error.
Maybe we will have to think a bit more about these problems?
Loc
Logged In: YES
user_id=501368
I tried the statement 'SELECT _MemberID, COUNT(*), SUM(1) FROM
sites GROUP BY _MemberID'. Ordering by clicking on the 'SUM(1)'
column header works perfectly but not clicking on 'COUNT(*)'. Clicking
on it the first time, all rows get sorted by proper 'COUNT(*)' value but there
is no down arrow next to 'COUNT(*)' indicating that data is sorted after
that values. Clicking on 'COUNT(*)' header again will still sort ascending.
Logged In: YES
user_id=501368
btw: I'm unable to set 'Resolution' to 'none'... using Opera 6.05. :-/
Logged In: YES
user_id=418833
Changing "Resolution" to "None" doesn't work with any
browser due to an SF bug.
When sending a SELECT query containing a GROUP BY
satement, I'm unable to use the sorting function: The column
head just isn't clickable!
Server:
Windows NT 5.2 RC1
Apache 2.0.43 / IIS 6.0
PHP 4.4.0-dev
MySQL 4.0.5-beta
Client:
Windows NT 5.1
MSIE 6.0 SP1 / Opera 7.0 beta 1
Logged In: YES
user_id=418833
ci-dev, I'm a little confused:
How could you test this, if you have the same problem as me
(bug #642319)? :o)
Logged In: YES
user_id=501368
I added another note to my initial note of bug #642319. Using this peace of
information should allow you to create simple 'GROUP BY' statements
with a clickable header.
btw: Where can I get 'PHP 4.4.0-dev'? ;-)
Logged In: YES
user_id=418833
Now that bug #642319 is fixed (thanks, Marc) I could
reproduce the bug.
btw: the latest PHP CVS snapshots (updated every few
hours) are available on <http://snaps.php.net>.
Logged In: YES
user_id=210714
Please try the new fix I just merged.
First of all, sorry that it took me more than 10 years to check back on this.
However, in 4.0.4.1 it still does not work in all cases. The query "SELECT SUM(field) FROM table GROUP BY field2" can be sorted ASC and DESC on the SUM column using the GUI. But as soon as I escape the argument, sorting will stick to ASC.
"SELECT SUM(
field
) FROM table GROUP BY field2" (note the backticks around "field") cannot be sorted DESC on SUM column using the GUI.PS: I am perfectly fine to let this bug report rest in peace and to move my issue to a new one. It's up to you.
Edit: For some reason, I do not find a way to re-open this ticket, so I created a new one, see [bugs:#4030].
Related
Bugs:
#4030Last edit: Alexander Schuch 2013-07-20
Wow, thanks for your feedback. You probably hold the record for pioneer users of phpMyAdmin who reported a bug and are still interested in its outcome.