Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  how to 'sort' original field when using 'sql' option

phpMyEdit General     how to 'sort' original field when using 'sql' option
Odoslať novú tému   Odpovedať na tému    
 
hiluc     Založený: 15.09.2004   Príspevky: 3  
Príspevok Zaslal: 2004-09-15 22:21
Návrat hore  Odpovedať s citátom     

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     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-09-16 08:49
Návrat hore  Odpovedať s citátom     

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...

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov