How do i actually get a value from my database and insert the data into a variable in my program?
char filter_exp[] = "";
MYSQL *conn; // pointer to MySQL structure
conn = mysql_init(NULL); // connection handle
// Connect to MySQL database
// host address = localhost, username = root, database = project
mysql_real_connect(conn, "localhost", "root", "", "project", 0, NULL, 0);
mysql_query(conn, "SELECT Filter from setting where transmit='1'");
I need to get a value from the table setting , field = Filter and get the value inside. How do i assign a variable now? i really don't get it. Please help.