You can call the mysql_stmt_fetch_column() function to fetch one column from the current result set row.
Syntax
int
mysql_stmt_fetch_column(MYSQL_STMT *stmt,
MYSQL_BIND *bind,
unsigned int column,
unsigned long offset)
Arguments
bindprovides the buffer where data should be placed. It should be set in the same way asmysql_stmt_bind_result().columnindicates the column to fetch. The first column is numbered 0.offsetis the offset for retrieving data within the data value. It can be used to fetch the data value in pieces. The beginning offset of the value is 0.
Return values
0 is returned for an execution success, and a non-zero value is returned if an error occurred.
Errors
CR_INVALID_PARAMETER_NO: The column number was invalid.
CR_NO_DATA: The end of the result set has already been reached.