0

Having trouble storing dollar amounts in the thousands due to the "," that gets inserted once the number becomes 1, 000.00. Any advise?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by fuston05
0

Filter the "." before you insert it. You can replace the period by applying replace():

INSERT INTO mytable myvalue VALUES (replace('1.000','.',''));
0

I appreciate your advise. However this turned out to be a beginner's mistake. I was using number_format() "BEFORE" my insert statement. That was throwing the "," in there. I just took off the number_format(), and used decimal(10,2) and it works perfectly. Sorry. haha lesson learned :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.