Unfortunately ZF is a little inconsistent about how it handles this. Some of the classes do work with array parameters, but unfortunately fetchAll()
on the adapter class isn't one of them. There are two (slightly messy) options I'm aware of:
Switch to building the query with Zend_Db_Select
instead (which does handle it correctly):
$select = $db->select();
$select->from('user')
->where('email IN (?)', $email);
$db->fetchAll($select);
or stick with fetchAll
and use quoteInto:
$db->fetchAll("SELECT * FROM user WHERE ".$db->quoteInto('email IN (?)', $email));