This topic is locked

Number field format

5/20/2007 6:51:23 AM
PHPRunner General questions
O
osluk author

I have varchar fields which would not sort by value unless I choose number format.

But I dont want 2 deciamal palces being displayed.
See http://www.bordeauxreport.com/db-2006-view...hp?pagesize=500
Any ideas
Cheers Chris

J
Jane 5/21/2007

Chris,
to change number of decimal places open generated include/locale.php file, find and modify following line:

$locale_info["LOCALE_IDIGITS"]="2";

O
osluk author 10/28/2007

Thanks Jane
£6,600.00

14000

£4,000.00
Ideally I would add a 1000 seperator so 14000 would become 14,000
Where would I do this?
Chris

Chris,

to change number of decimal places open generated include/locale.php file, find and modify following line:

kujox 10/28/2007

Thanks Jane

£6,600.00

14000

£4,000.00
Ideally I would add a 1000 seperator so 14000 would become 14,000
Where would I do this?


Chris
I would put it in the list table in visual editor
go to the properties and click custom, the enter $value = "£" . number_format($value,2);
that should work
Chris

O
osluk author 10/28/2007

Chris you are a star.
I have what I need as shown here:


This is what and where it is entered


Thanks for that

Chris



Chris
I would put it in the list table in visual editor
go to the properties and click custom, the enter $value = "£" . number_format($value,2);
that should work
Chris

O
osluk author 10/28/2007

Thanks Chris I have this as required now.
I have what I need as shown here:


This is what and where it is entered


It works so I guess the syntax is correct.

Can you confirm this is correct. ie No currency sign, zero deciamal places, and a 000's seperator.
$value = number_format($value,0);
Thanks Chris

kujox 10/29/2007

Thanks Chris I have this as required now.

I have what I need as shown here:


This is what and where it is entered


It works so I guess the syntax is correct.

Can you confirm this is correct. ie No currency sign, zero deciamal places, and a 000's seperator.
Thanks Chris


Looks fine to me, if you google number_format php it will show you the other things you can do with that command

A
amuro 12/5/2007

Chris,

to change number of decimal places open generated include/locale.php file, find and modify following line:


Jane,
If all number data is 0 decimal, can I modify the file which set the number format?

I don't want to modify the generated file, because it has to remodify after the project re-build each time.
Thank you,

Admin 12/5/2007

Amuro,
what exactly are you trying to do ?

O
osluk author 12/6/2007

Modify any fields you need in the visual editor!
Cheers Chris



Jane,
If all number data is 0 decimal, can I modify the file which set the number format?

I don't want to modify the generated file, because it has to remodify after the project re-build each time.
Thank you,