Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  how to 'sort' original field when using 'sql' option

phpMyEdit General     how to 'sort' original field when using 'sql' option
Post new topic   Reply to topic    
 
hiluc     Joined: 15 Sep 2004   Posts: 3  
Post Posted: 2004-09-15 22:21
Back to top  Reply with quote     

A column 'title' is setup with 'sql|L' option (to have a clickable link to a file using other fields from the same table)
$opts['fdd']['title'] = array(
'name' => 'Title', 'sort' => true,
'escape' => false, 'sql|L' => 'concat("<a target=\"_blank\" href=\"",file_path,file_name,"\">",title,"</a>")',
);
Now, when sorting: the result of the 'sql|L' - query is sorted, not the displayed field (->title). Any help or workaround ?

 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-09-16 08:49
Back to top  Reply with quote     

it is sorted by the string, which is '<a href...>' in this case. to sort if by title, there are two possibilities i see:

1. allow usage of $row array in 'url' option (as is suggested in some of my bug reports/feature requests/patches)

2. change the string so that it sortes by what you need. something like '<a title= .. href=..>title</a>' hope it's at least a little html correct...

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy