retrieveRange( 'SELECT cve.* FROM controlled_vocab_entries cve JOIN user_interests ui ON (cve.controlled_vocab_entry_id = ui.controlled_vocab_entry_id) ' . ($filter?'JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id)':'') . ' WHERE cve.controlled_vocab_id = ? ' . ($filter?'AND cves.setting_name=? AND LOWER(cves.setting_value) LIKE LOWER(?)':'') . ' GROUP BY cve.controlled_vocab_entry_id ORDER BY seq', $params, $rangeInfo ); return new DAOResultFactory($result, $this, '_fromRow'); } /** * Retrieve controlled vocab entries matching a list of vocab entry IDs * * @param $entryIds array * @return DAOResultFactory */ public function getByIds($entryIds) { $entryString = join(',', array_map('intval', $entryIds)); $result = $this->retrieve( 'SELECT * FROM controlled_vocab_entries WHERE controlled_vocab_entry_id IN (' . $entryString . ')' ); return new DAOResultFactory($result, $this, '_fromRow'); } } ?>