|
The mi_value() function retrieves a column value from a row, given the column identifier.
The mi_value() function returns the value for the column that the column_id column identifier specifies. It retrieves this column value from the row structure that row references. This function is typically called in a loop that terminates when mi_value() has retrieved values for all the columns in the row.
Important: The "value_buf" parameter points to the representation of the value that corresponds to the control mode of the query: a character string for text representation and the internal format for binary representation.
The way to interpret the data returned in the value_buf depends on the mi_value() return value, as follows.
MI_NORMAL_VALUE | indicates that the retbuf value is not a row type or a collection. |
MI_COLLECTION_VALUE | indicates that the retbuf value is a pointer to a structure (MI_COLLECTION). |
MI_ROW_VALUE | indicates that the retbuf value is a pointer to a row structure (MI_ROW). |
MI_NULL_VALUE | indicates that the retbuf value is an SQL NULL value. |
MI_ERROR | indicates that the function was not successful. |
See the descriptions of the following functions: mi_collection_fetch(), mi_next_row(), mi_save_set_insert(), and mi_value_by_name().
For more information about how to retrieve values, see Obtaining Column Values.