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  »  Currency Formatting?

phpMyEdit General     Currency Formatting?
Odoslať novú tému   Odpovedať na tému    
 
ryanhart     Založený: 08.04.2004   Príspevky: 12  
Príspevok Zaslal: 2005-07-29 16:35
Návrat hore  Odpovedať s citátom     

I can't figure out how to format currency with commas.
This is what I have so far...
example:
'mask' => '$%01.2f', = $123567.00

the result I want is: $123,567.00

I would appreciate any suggestions.

Thanks,

Ryan

 
guardian46     Založený: 31.05.2005   Príspevky: 34  
Príspevok Zaslal: 2005-07-29 22:38
Návrat hore  Odpovedať s citátom     

Ryan,

Doug posted this for me in another thread and it works for me. I'm using the CVS ver 1.167 of phpMyEdit.class.php.

Kód:
$opts['fdd']['columnname']['sql|LF'] = 'if(columnname <> "0.00", CONCAT("$", FORMAT(columnname, 2)), columnname)';


replace columnname with your column.

 
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