【发布时间】:2012-01-13 10:30:55
【问题描述】:
我在 Zend 应用程序中遇到了一个奇怪的问题:
我的模型是这样的:
public function checkEmailAndProfileName($emailId, $proName) {
$select = $this->select()
->where('email_address = ?', $emailId)
->where('profile_name = ?', $proName);
$result = $this->getAdapter()->fetchRow($select);
}
说明
假设我在数据库中有一行电子邮件地址为“test@test.com”,配置文件名称为“profilename”。
现在,如果我将以下参数传递给模型:
$modelObj->checkEmailAndProfileName("test@test.com", "profilename");
一切正常。
问题
如果我通过了:
$modelObj->checkEmailAndProfileName("test@test.com", "ProfileNAME");
然后它应该返回false,但奇怪的是它返回了“test@test.com”、“profilename”的行。我不想...
谁能帮我告诉我做错了什么...?
提前致谢……
【问题讨论】:
标签: php mysql zend-framework select model