Changed $db->exec() to $db->query() since this method doesn't exist with Zend_Db_Adapter_Mysqli