开发者

Zend DB Table: All Values are Strings

开发者 https://www.devze.com 2023-02-28 06:41 出处:网络
I am using Zend DB Table and DB Table Row.When I get a row object for any of my tables, I see that the types have all been changed to strings, even the auto-incrementing primary key.

I am using Zend DB Table and DB Table Row. When I get a row object for any of my tables, I see that the types have all been changed to strings, even the auto-incrementing primary key.

Is that normal? Do I need to explicitly define the schema to get around this? (I thought I'd read 开发者_如何转开发all the Zend DB documentation. Can't recall anything about this though.)


As Zend_Db uses PDO for most connections, you're always going to get strings back from a SELECT query.

See http://www.php.net/manual/en/pdostatement.fetchcolumn.php

0

精彩评论

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

关注公众号