db->select(); $select->from($this->pair); $select->where('featured=?', 'y'); $select->order('RAND()'); $select->limit($limit); return $this->db->fetchAll($select); } protected function _where(Zend_Db_Select $select = null) { if ($this->_isSmallList) { if (null === $select) { $select = $this->select; } $select->where('featured=?', 'y'); return $select; } else return $select; } }