Mude isso:
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT...
para isso:
$db = ezcDbInstance::get();
$db->setAttribute( PDO::ATTR_CASE, PDO::CASE_NATURAL );
$stmt = $db->prepare('SELECT ...
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT...
$db = ezcDbInstance::get();
$db->setAttribute( PDO::ATTR_CASE, PDO::CASE_NATURAL );
$stmt = $db->prepare('SELECT ...