Code:
string NewMovie = "ww";
string queryText ;
queryText = "Select * from movie_info WHERE movie_title = '"+ NewTitle +"'";
MYSQL *conn;
conn=mysql_init(NULL);
mysql_real_connect(conn,host,username,password,database,0,NULL,0);
mysql_query(conn,queryText.c_str());
????
mysql_close(conn);
return 0;
The problem i am facing is how do i check if the value is found. I read up and found that a query will return a value of TRUE if the query is a success and a FAIL if there is an error. How do i call these values and then based the check on it?
This is clearly a question about the MySQL C API (not even the C++ API) and would be best addressed on a MySQL community forum. You are much more likely to get an answer there.