MySQL Forums
Forum List  »  Connector/C++

library that contains mysql_init,mysql_query,mysql_fetch_row etc
Posted by: Rizwan Raza
Date: March 20, 2014 11:25AM

I inherited a really old codebase in C++ that is communicating with MySQL database part of which is shown below. The question what library defines functions such as mysql_init and the ones mentioned in the subject line.

MYSQL *hnd=NULL; // mysql connection handle
MYSQL_RES *res=NULL; // result of querying for all rows in table
MYSQL_ROW row; // one row returned

// START :: Get user's and company's profile from Awning Manager's DBs
hnd = mysql_init(NULL);
if (NULL == mysql_real_connect(hnd,DBServerName,DBUsername,DBPassword,"amlicensing",0,NULL,0))
MessageBox (NULL, "problem connecting..\n"
"Please ensure that you're connected to the internet and that your\n"
, "Error", MB_OK|MB_ICONERROR);
else
{
if (!mysql_query(hnd,"select * from users where username=\"" + s_LocalLoggedInAs + "\""))
{
res = mysql_use_result(hnd);
if (res)
{

Options: ReplyQuote


Subject
Views
Written By
Posted
library that contains mysql_init,mysql_query,mysql_fetch_row etc
3605
March 20, 2014 11:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.