I am using the "MySQL C API" to query the database and I have the results stored in MYSQL_ROW types. I am able to use print the results to the console with printf("%s", row[0]), however, according to the MySQL C API documentation, I cannot use them as null-terminated strings.
At the bottom of http://dev.mysql.com/doc/refman/5.0/en/c-api-function-overview.html, they say I can "extract" the information with mysql_store_result() or mysql_use_result(). However, I am still confused as to how this is done.
Ideally, I want to the results out as a string so I can do stuff like strcmp, etc but else I definitely need to use the information somehow with those two functions.
Can somebody show me an example of how to do this?
Thanks