/** * Returns the values for $col column in the select query for $ids ids * @param array $ids * @param string $columnName * @return mixed[] * @throws InvalidArgumentException */ public function selectColByIds(array $ids = array(), $columnName = 'id') { if (empty($ids)) { return array(); } $_query = $this->getSelectQueryByIds($ids); $_columnIndex = $this->_getColumnIndexInSelectQuery($columnName); if ($_columnIndex === false) { throw new \InvalidArgumentException(get_called_class() . '::' . __FUNCTION__ . '() Invalid column name given as second parametter. "' . $columnName . '" given'); } $_stmt2 = $this->db->getAdapter()->query($_query); return $_stmt2->fetchAll(\Zend_Db::FETCH_COLUMN, $_columnIndex); }
/** * @return \Zend_Db_Adapter_Abstract * @TODO Find a way to remove this usage */ public function getAdapter() { return $this->reader->getAdapter(); }