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:
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_format
0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
will try and get back
0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
thanks
0
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.