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  »  Alphanumeric sort

phpMyEdit General     Alphanumeric sort
Odoslať novú tému   Odpovedať na tému    
 
rlugo     Založený: 18.12.2007   Príspevky: 4  
Príspevok Zaslal: 2007-12-23 20:09
Návrat hore  Odpovedať s citátom     

Hi all,

I am trying to sort this alphanumeric data:

1000MB
100MB
12MB

Into this:

12MB
100MB
1000MB

I tried hacking the phpMyEdit.class.php with this code:

...
if ($parts['orderby'] != '')
$ret .= ' ORDER BY CAST('.$parts['orderby'].' AS UNSIGNED),'.$parts['orderby'];
...

but I get the following error:

MySQL error 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`PMEtable0`.`Id` AS UNSIGNED),`PMEtable0`.`Web Space`,`PMEtable0`.`Id` LIMIT 0, ' at line 1

 
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