Jump to content

Inserting float value of 1,226.37 into Decimal(10,2) table column


SchweppesAle

Recommended Posts

That's because a 1000's comma is a human convention to make a number more human readable. It has no meaning to a computer and in fact most computer programs stop parsing numbers at the first non-number, which is why you are only getting a 1.

 

You need to remove any commas from numbers. str_replace would probably be the quickest function to use - http://us3.php.net/manual/en/function.str-replace.php

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.