I am facing a strange issue in my Zend Application:
My model is like this:
public function checkEmailAndProfileName($emailId, $proName) {
$select = $this->select()
->where('email_address = ?', $emailId)
->where('profile_name = ?', $proName);
$result = $this->getAdapter()->fetchRow($select);
}
Explanation
Suppose I have a row in database with email address “test@test.com” and profile name as “profilename”.
Now if I pass following parameters to the model:
$modelObj->checkEmailAndProfileName("test@test.com", "profilename");
It is working fine as I want.
Problem
Now If I pass:
$modelObj->checkEmailAndProfileName("test@test.com", "ProfileNAME");
Then it should return false, but strangely it is returning the row of “test@test.com”, “profilename”. That I don’t want…
can anyone help me by telling What I am doing wrong…?
Thanks In Advance…
What you need is
BINARYof mysqlUsing
BINARYin theWHEREclause forces a match on the binary collation, which in English means that it matches actual characters by their character code, not by whether the characters are deemed equivalent.