Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

library that contains mysql_init,mysql_query,mysql_fetch_row etc (1 reply)

$
0
0
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)
{

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>