BIGINT it comes back as a string.
I can't remember where I read this, but this might be part of 5.3 &
the mysqlnd work...
On Aug 1, 2008, at 12:00 PM, Bill Karwin wrote:
>
>
>
> ardx wrote:
>>
>> I am new to ZF, and puzzled by the behaviour of Zend_DB with the
>> PDO_MYSQL
>> adapter (ZF ver 1.5.3).
>>
>> When I use it to query a table that has integer type columns, it
>> returns
>> the values of the column as strings. Why is that? Is it possible to
>> configure it somehow so that integer values are returned as integers?
>>
>
> Integers may be 64-bit BIGINT data types, which would exceed the
> size of the
> PHP builtin int type. Zend_Db doesn't query the metadata of result
> sets, so
> it doesn't do any special handling for any SQL data types. String
> is the
> only PHP type that can safely represent every SQL data type.
>
> Regards,
> Bill Karwin
> --
> View this message in context: http://www.nabble.com/Why-does-DB-return-integers-as-strings--tp18777147p18777728.html
> Sent from the Zend DB mailing list archive at Nabble.com.
>
没有评论:
发表评论