>有没有人遇到过在ZF2中使用PostgreSQL适配器的表名错误?
我有一个名为UserId的列,当我尝试基于此更新/删除行时,出现此错误:
ERROR: column 'userid' does not exist
而不是UserId
.
这是我的代码:
$delete = $this->delete(
'Users'
, array(
'UserId = ?' => $UserId
)
);
可能与autoQuoteIdentifiers
有关,但我在网上找不到太多关于它的信息。
有什么想法吗?
问题是驼峰大小写列名称需要用双引号括起来,因此数组应该是:
array('"UserId" = ?' => $UserId)