Mysql, comma and dot problem in my query?

I have SQL like this and am selecting amount from the mysql db table. example query,

I have table field amount value as . 625.76 .. so, i want to select this as COMMA i.e " 625, 76" ... (instead of dot separator , i need comma separator)...

for this i write in sql like tihs , ... REPLACE(TRUNCATE(fun_amount,2),'.',',') AS fun_amount ....

it works well in windows but in Linux it displays like this, "625, 75" ... instead of "625, 76"...

How can I fix this ?

I am using Tomcat 5.5. and mysql 5.0
LVL 36
Loganathan NatarajanLAMP DeveloperAsked:
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I would say you might try out the FORMAT funciton instead of replace + truncate:
Loganathan NatarajanLAMP DeveloperAuthor Commented:
will try and get back
Loganathan NatarajanLAMP DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.