MYSQL_RES This structure represents the result of a query that returns rows (SELECT, SHOW, DESCRIBE, EXPLAIN). The information returned from a query is called the result set in the remainder of this section. MYSQL_ROW This is a type-safe representation of one row of data. It is currently implemented as an array of counted byte strings. (You cannot treat these as null-terminated strings if field values may contain binary data, because such values may contain null bytes internally.) Rows are obtained by calling mysql_fetch_row(). 根据手册很清楚,MYSQL_ROW 就是一个string, 如果你想处理数据,建议用MYSQL_RES 用mysql_query 执行你的select 然后用 mysql_store_result来处理。网上找个例子参考一下。
请看这个帖,数据库数据为整型时取出来用atoi函数转换一下的确可以取出为整型,但浮点型就怎么也变不过去,atof函数也没用。
char c = *mysql_row[i]即可。注意,mysql_row[i]对应的字段必须是浮点型回复2楼的
好像MYSQL_RES就是从MYSQL_RES的data字段中取出来的