Zend_Db fetchAll does not return data while raw SQL does (International characters)

reaperkiller117

New Member
I have been searching in vain for the last hour to get a solution to a very peculiar issue.I am constructing a \[code\]Zend_Db_Select\[/code\] object with the passed parameters in my function and then at the end I am calling\[code\]$return = $select->query()->fetchAll(Zend_Db::FETCH_OBJ);\[/code\]The \[code\]Zend_Db_Select\[/code\] object "filters" data with a \[code\]$select->where()\[/code\] for a firstname and a lastname, like so:\[code\]$select->where( 'u.firstname LIKE ' . $db->quote('%'.$firstname.'%') . ' OR u.lastname LIKE ' . $db->quote('%'.$firstname.'%'));\[/code\]Assume that $firstname is "Noob". The \[code\]$select->__toString()\[/code\] outputs:\[code\]SELECT id FROM usersWHERE (firstname LIKE '%Noob%' OR u.lastname LIKE '%Noob%') LIMIT 12;\[/code\]Everything is fine, the data comes back.If I use a string that has UTF-8 characters i.e. names not in English ($firstname = "It?l"), the \[code\]$select->__toString()\[/code\] produces:\[code\]SELECT id FROM usersWHERE (firstname LIKE '%It?l%' OR u.lastname LIKE '%It?l%') LIMIT 12;\[/code\]which is perfect. However no data is returned back from the \[code\]$select->query()->fetchAll(Zend_Db::FETCH_OBJ)\[/code\] call.I run the query directly in MySQL and I can see the rows.Any pointers are more than appreciated.
 
Top