/** * Get array of only one field * * @param string $field_identifier * @param bool $is_numeric_identifier(true-$field_identifier is numeric, false-$field_identifier is a name) * @param int $offset * @param int $len * @return array */ public function fetchFields($field_identifier, $is_numeric_identifier = false, $offset = 0, $len = 0) { if ($this->is_result_cached) { $array_to_return = array(); foreach ($this->result as $key => $val) { if ($is_numeric_identifier) { $keys = array_keys($val); $array_to_return[] = $val[$keys[$field_identifier]]; } else { $array_to_return[] = $val[$field_identifier]; } } return $array_to_return; } else { return parent::fetchFields($field_identifier, $is_numeric_identifier, $offset, $len); } }