开发者

Database number columns automatically casting to integers

开发者 https://www.devze.com 2023-03-09 20:41 出处:网络
Using the Zend_Db_Table_Abstract to retrieve table rows, my BIGINT fields are 开发者_StackOverflow中文版being automatically cast to integers. This is not required, and on 32 bit systems is obviously a

Using the Zend_Db_Table_Abstract to retrieve table rows, my BIGINT fields are 开发者_StackOverflow中文版being automatically cast to integers. This is not required, and on 32 bit systems is obviously a bug waiting to happen.

Is there a simple way to keep these values as strings without setting up complex mapping classes?


Are you sure that the database adapter (on the PHP side, not ZF side) itself isn't doing that?

I know PDO_MySQL and MySQLi both do that by default, though I'm not 100% sure how they handle BIGINT values on 32bit vs 64bit systems.

0

精彩评论

暂无评论...
验证码 换一张
取 消