mysql C API connection question

Hi here.

I have a question about connecting to mysql server through C API.

Does the client program have to initial a single instance of struct MYSQL for every new invoking of mysql_real_connect()?

Sorry that if this is a stupid question as I always coding at JAVA. But I have a particular situation to make me have to connect to mysql by C API. and I have no idea about it.

I appreciate to any thread following here!

liang xiao
MYSQL

This structure represents a handle to one database connection.



So, how i can interpret it, if you have mysql_close'd() one connection, then you may use its MYSQL struct for another mysql_real_connect(). Otherwise you should create one MYSQL instance for each connection.
Hi melkiy,

Thanks, If I read manual careful enough, I should find answer myself.
I should have to RTFM before ask question.

Thanks again.
Topic archived. No new replies allowed.