Hi!
In my recent CVS HEAD checkout, I cannot click on a table header anymore to sort rows of a resultset descending.
The first click will result in ASC ordering. No up/down arrows will be shown, clicking again will always result in ASC ordering.
Using PHP 5.2.0-RC1 and a standard config.inc.php, HTTP authentication, Firefox 1.5.0.6 on a Windows client. register_globals turned off
Any ideas where I should look? Pointing me into the right direction would be neat. If nobody knows, I'll get my own hands dirty. ;)
Best regards, Garvin
Garvin Hicking-2 wrote:
Hi!
In my recent CVS HEAD checkout, I cannot click on a table header anymore to sort rows of a resultset descending.
The first click will result in ASC ordering. No up/down arrows will be shown, clicking again will always result in ASC ordering.
Using PHP 5.2.0-RC1 and a standard config.inc.php, HTTP authentication, Firefox 1.5.0.6 on a Windows client. register_globals turned off
Any ideas where I should look? Pointing me into the right direction would be neat. If nobody knows, I'll get my own hands dirty. ;)
Best regards, Garvin --
hi, in addition to this, the setting $cfg['Order'] = 'smart' in config is not obeyed since many versions i was very handy for timestamp fields some years ago ;)
Garvin Hicking a écrit :
Hi!
In my recent CVS HEAD checkout, I cannot click on a table header anymore to sort rows of a resultset descending.
The first click will result in ASC ordering. No up/down arrows will be shown, clicking again will always result in ASC ordering.
Using PHP 5.2.0-RC1 and a standard config.inc.php, HTTP authentication, Firefox 1.5.0.6 on a Windows client. register_globals turned off
Any ideas where I should look? Pointing me into the right direction would be neat. If nobody knows, I'll get my own hands dirty. ;)
Best regards, Garvin
Hi Garvin,
this bug occurs also in QA_2_9, so we better fix this before 2.9.0-beta1!
Have a look at libraries/display_tbl.lib.php. Are you looking at this now?
Marc
Hi!
this bug occurs also in QA_2_9, so we better fix this before 2.9.0-beta1!
Have a look at libraries/display_tbl.lib.php. Are you looking at this now?
Looking at it right now. Seems to be caused that the SQL query statement now emits
"ORDER BY `table` . `colum` DESC"
instead of the former one
"ORDER BY column DESC".
Thus the proper column type can no longer be matched in $sort_expression on line 480.
I'm looking how to manipulate it to easiest fix it.
Regards, Garvin
Hi!
"ORDER BY `table` . `colum` DESC"
The additional space is making the string compare fail.
This patch seems to fix it:
http://nopaste.php-q.net/232872
I don't know if that introduces side effects. I think the better fix would be to look why extra spaces have been introduced before and after the "."?
Regards, Garvin
Garvin Hicking-2 wrote:
Hi!
"ORDER BY `table` . `colum` DESC"
The additional space is making the string compare fail.
This patch seems to fix it:
http://nopaste.php-q.net/232872
I don't know if that introduces side effects. I think the better fix would be to look why extra spaces have been introduced before and after the "."?
Regards, Garvin
-- Garvin Hicking | Web-Entwickler | Make me happy: www.supergarv.de | #ICQ 21392242 | http://wishes.garv.info/
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&da... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
the fix works so far. maybe the problem was introduced after chg.: sqlparser.lib.php 2.50 2 weeks cybot_tm correctly unquote identifiers ( near display_tbl.lib.php,v 2.108 2006/08/02 15:40:12 cybot, i am not yet too familiar whith the code to find out quickly but now i know where to dig for that 'smart' thing :)
Garvin Hicking a écrit :
Hi!
"ORDER BY `table` . `colum` DESC"
The additional space is making the string compare fail.
This patch seems to fix it:
http://nopaste.php-q.net/232872
I don't know if that introduces side effects. I think the better fix would be to look why extra spaces have been introduced before and after the "."?
Regards, Garvin
Thanks I'll look at the patch ASAP.
Marc
Garvin Hicking a écrit :
Hi!
"ORDER BY `table` . `colum` DESC"
The additional space is making the string compare fail.
This patch seems to fix it:
http://nopaste.php-q.net/232872
I don't know if that introduces side effects. I think the better fix would be to look why extra spaces have been introduced before and after the "."?
Regards, Garvin
Try the "better fix": Index: sqlparser.lib.php =================================================================== RCS file: /cvsroot/phpmyadmin/phpMyAdmin/libraries/sqlparser.lib.php,v retrieving revision 2.50 diff -c -r2.50 sqlparser.lib.php *** sqlparser.lib.php 2 Aug 2006 11:36:12 -0000 2.50 --- sqlparser.lib.php 16 Aug 2006 15:44:50 -0000 *************** *** 1512,1518 **** $group_by_clause .= $arr[$i]['data'] . $sep; } if ($in_order_by && $upper_data != 'ORDER' && $upper_data != 'BY') { ! $order_by_clause .= $arr[$i]['data'] . $sep; } if ($in_having && $upper_data != 'HAVING') { $having_clause .= $arr[$i]['data'] . $sep; --- 1512,1523 ---- $group_by_clause .= $arr[$i]['data'] . $sep; } if ($in_order_by && $upper_data != 'ORDER' && $upper_data != 'BY') { ! // add a space only before ASC or DESC ! // not around the dot between dbname and tablename ! if ($arr[$i]['type'] == 'alpha_reservedWord') { ! $order_by_clause .= $sep; ! } ! $order_by_clause .= $arr[$i]['data']; } if ($in_having && $upper_data != 'HAVING') { $having_clause .= $arr[$i]['data'] . $sep;
hmmm Garvins hack worked, "the better one= doesn't :(
rephrase:
Garvin's hack worked, "the better one" doesn't :(
1st click sorts, but no up/down arrow appears. 2nd click does nothing but refresh - or is "the better" meant as additional patch?
Jürgen Wind a écrit :
rephrase:
Garvin's hack worked, "the better one" doesn't :(
1st click sorts, but no up/down arrow appears. 2nd click does nothing but refresh - or is "the better" meant as additional patch?
It replaces Garvin's patch and surely works here. Try a checkout of current HEAD or QA_2_9.
Marc
Marc Delisle wrote:
Jürgen Wind a écrit :
rephrase:
Garvin's hack worked, "the better one" doesn't :(
1st click sorts, but no up/down arrow appears. 2nd click does nothing but refresh - or is "the better" meant as additional patch?
It replaces Garvin's patch and surely works here. Try a checkout of current HEAD or QA_2_9.
Marc
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&da... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Marc Delisle wrote:
It replaces Garvin's patch and surely works here. Try a checkout of current HEAD or QA_2_9.
Marc
you are right (of course ;), i messed something up.