hey all,
recently ive been trying to run mysql queries in c++. ive successfully connect to the database using the following code:
what am stuck on is how to do a select statement in cCode: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);
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.



LinkBack URL
About LinkBacks


