Zend DB 表:所有值都是字符串
我正在使用 Zend DB Table 和 DB Table Row。当我获取任何表的行对象时,我发现所有类型都已更改为字符串,甚至自动递增主键也是如此。
这正常吗?我是否需要显式定义架构来解决这个问题? (我以为我已经阅读了所有 Zend DB 文档。但不记得任何有关此的内容。)
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.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 Zend_Db 对大多数连接使用 PDO,因此您总是会从
SELECT
查询中获取字符串。请参阅http://www.php.net/manual/en/pdostatement.fetchcolumn。 php
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