Hi,
the players:
- 64bit linux with
- php 5 (ZendFramework 1.10.2)
- PostgreSQL 8.3
- Doctrine 1.2
Via a Flash/Flex client i get an 8byte integer value.
the field in the database is an BIGINT (8 byte)
PHP_INT_SIZE show that system supports 8byte integer.
printing out the value in the code as it is and as intval() leads to this:
Plain: 1269452776100
intval: 1269452776099
float rounding failure ?
but what really driving me nuts is
ERROR: invalid input syntax for integer: "1269452776099.000000"'
when i try to use it in a query. like:
Doctrine_Core::getTable('table')->findBy('external_id',$external_id);
or
Doctrine_Core::getTable('table')->findBy('external_id',intval($external_id));
How i am supposed to handle this ? or how can i give doctrine a floating point number which it should use on a bigint field ?
Any help is much appreciated!
TIA
EDIT:
from the model:
$this->hasColumn('external_id', 'integer', 8, array(
'type' => 'integer',
'length' => 8,
'fixed' => false,
'unsigned' => false,
'notnull' => false,
'primary' => false,
));
Database field is bigint 8 bytes.
EDIT2: http://bugs.php.net/bug.php?id=48924 seems to be the root of the problem