result_id); } // -------------------------------------------------------------------- /** * Fetch Field Names * * Generates an array of column names * * @return array */ public function list_fields() { $field_names = array(); for ($i = 0, $num_fields = $this->num_fields(); $i < $num_fields; $i++) { $info = ibase_field_info($this->result_id, $i); $field_names[] = $info['name']; } return $field_names; } // -------------------------------------------------------------------- /** * Field data * * Generates an array of objects containing field meta-data * * @return array */ public function field_data() { $retval = array(); for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) { $info = ibase_field_info($this->result_id, $i); $retval[$i] = new stdClass(); $retval[$i]->name = $info['name']; $retval[$i]->type = $info['type']; $retval[$i]->max_length = $info['length']; $retval[$i]->primary_key = 0; $retval[$i]->default = ''; } return $retval; } // -------------------------------------------------------------------- /** * Free the result * * @return void */ public function free_result() { @ibase_free_result($this->result_id); } // -------------------------------------------------------------------- /** * Result - associative array * * Returns the result set as an array * * @return array */ protected function _fetch_assoc() { return @ibase_fetch_assoc($this->result_id, IBASE_FETCH_BLOBS); } // -------------------------------------------------------------------- /** * Result - object * * Returns the result set as an object * * @return object */ protected function _fetch_object() { return @ibase_fetch_object($this->result_id, IBASE_FETCH_BLOBS); } } /* End of file ibase_result.php */ /* Location: ./system/database/drivers/ibase/ibase_result.php */