hey all,
recently ive been trying to run mysql queries in c++. ive successfully connect to the database using the following code:
Code:
MYSQL mysql;
MYSQL *mysqlRtn;
mysql_init(&mysql);
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "administrator");
mysqlRtn = mysql_real_connect(&mysql, "localhost", "root", "password", "administrator", 0, NULL, 0);
what am stuck on is how to do a select statement in c
for example:
SELECT * FROM <table>;
does anyone know how i can do this in c and return all the data in an array of sorts?
Thanks in advance.