Hello AppGini's family. Once again I need your help. I have this code on the hooks
sql("UPDATE clients SET credit ='$credit' WHERE idclient ='$id' ", $eo); - shows number like 1000000, I want to show like this 1 000 000
sql("UPDATE clients SET versement ='$versement' WHERE idclient ='$id' ", $eo);- shows number like 1000000, I want to show like this 1 000 000
sql("UPDATE clients SET balance ='$apayer' WHERE idclient ='$id' ", $eo);- shows number like 1000000, I want to show like this 1 000 000
Please any help will be really appreciated.
Thank you
Numbers format
Re: Numbers format
Hi Moh,
as you refer to an Update to the DB I'm not sure what you mean by "I want to show like 1 000 000". Are you refering to the data being stored like this in the database, or do you want it in your app?
If you want to store it like this in you db you could use: sql("UPDATE clients SET credit =replace(format('$credit',0),","," ") WHERE ....
If you want to display it in you table-view you can use the dataformat for the fields (credit, versement, apayer). You need to update the file INSTALLATIONPATH_OF_APPGINI\add-ons\dataFormats.cfg and add a line like
Display Number as X XXX XXX; REPLACE(FORMAT(%%FIELD%%, 2), ',', ' ')
beaware that the representation only seems to work in the table view. I have opened a inquery at https://forums.appgini.com/phpbb/viewto ... =11&t=2655
as you refer to an Update to the DB I'm not sure what you mean by "I want to show like 1 000 000". Are you refering to the data being stored like this in the database, or do you want it in your app?
If you want to store it like this in you db you could use: sql("UPDATE clients SET credit =replace(format('$credit',0),","," ") WHERE ....
If you want to display it in you table-view you can use the dataformat for the fields (credit, versement, apayer). You need to update the file INSTALLATIONPATH_OF_APPGINI\add-ons\dataFormats.cfg and add a line like
Display Number as X XXX XXX; REPLACE(FORMAT(%%FIELD%%, 2), ',', ' ')
beaware that the representation only seems to work in the table view. I have opened a inquery at https://forums.appgini.com/phpbb/viewto ... =11&t=2655
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Numbers format
Hi
Thank you for your reply. I am going to test and back to you.
Regards,
Thank you for your reply. I am going to test and back to you.
Regards,