oci_num_fields example


class Result extends BaseResult
{
    /** * Gets the number of fields in the result set. */
    public function getFieldCount(): int
    {
        return oci_num_fields($this->resultID);
    }

    /** * Generates an array of column names in the result set. */
    public function getFieldNames(): array
    {
        return array_map(fn ($fieldIndex) => oci_field_name($this->resultID, $fieldIndex)range(1, $this->getFieldCount()));
    }

    /** * Generates an array of objects representing field meta-data. */
Home | Imprint | This part of the site doesn't use cookies.