PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #6308

Can't update with decimal/float values?

Details

Submitted2005-12-20 22:56 UTC
Fromjoshs at endquote dot com
StatusBogus
PackageDB_DataObject
PHP Version5.0.3
OSOS X
Roadmaps(Not assigned)

Comments

[2005-12-20 22:56 UTC] joshs at endquote dot com

Description:
------------
$_POST['freqTower'] = '120.6';
$airport->freqTower = $_POST['freqTower'];
$airport->update();

The query generated is:

UPDATE airport SET freqTower = 120 WHERE airport.airportid = 1

Note the loss of the ".6".

I've tried setting the field type to float, decimal, and double, all with the same results.

[2005-12-20 23:00 UTC] joshs at endquote dot com

This appears to be a problem with all field types. I wonder if the fix to #620 caused this?

[2005-12-20 23:05 UTC] joshs at endquote dot com

Nevermind, it's a problem with some of my own code.