Sir can you please provide a tutorial on this topic: Connect C program to Mysql database... Sir I am very troubled and I am not getting any reference about this Sir... and I want to connect my C program with Mysql... Please sir tell me how to download Mysql C Programming A.P.I. and how to use it with codeblock along with configuring it, please tell me all this in 1 tutorial Sir... I will always be grateful to you... 🙏🙏
#include #include main() { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char *server = "localhost"; char *user = "root"; char *password = "*********"; char *database = "dbname"; conn = mysql_init(NULL); /* Connect to database */ if (!mysql_real_connect(conn, server, user, password, database, 0, NULL, 0)) { fprintf(stderr, "%s ", mysql_error(conn)); exit(1); } /* send SQL query */ if (mysql_query(conn, "show tables")) { fprintf(stderr, "%s ", mysql_error(conn)); exit(1); } res = mysql_use_result(conn); /* output table name */ printf("MySQL Tables in mysql database: "); while ((row = mysql_fetch_row(res)) != NULL) printf("%s ", row[0]); /* close connection */ mysql_free_result(res); mysql_close(conn); }, I tried with this code but u got mysql.h is not found , you also need to install mysql connector for C/C++, hope this helps you, sorry I tried my best
@@unitedtoptech6288 ok no problem... I think you are sound good in technology... But you are also like others copy paste... Ok leave it... I already have thid code snippet... Thanks for your time and help 🙏🙏
Thank you for the help! Are the lingering Bluestack files in the prefetch folder ( C:\Windows\prefetch ) ok to delete?
Yes they are
Sir can you please provide a tutorial on this topic: Connect C program to Mysql database... Sir I am very troubled and I am not getting any reference about this Sir... and I want to connect my C program with Mysql... Please sir tell me how to download Mysql C Programming A.P.I. and how to use it with codeblock along with configuring it, please tell me all this in 1 tutorial Sir... I will always be grateful to you... 🙏🙏
I will try in the future bro
Ok Sir... But try asap because i need that tutorial hardly...
Thanks for giving your attention here and thanks for help... 🙏🙏
#include #include main() { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char *server = "localhost"; char *user = "root"; char *password = "*********"; char *database = "dbname"; conn = mysql_init(NULL); /* Connect to database */ if (!mysql_real_connect(conn, server, user, password, database, 0, NULL, 0)) { fprintf(stderr, "%s
", mysql_error(conn)); exit(1); } /* send SQL query */ if (mysql_query(conn, "show tables")) { fprintf(stderr, "%s
", mysql_error(conn)); exit(1); } res = mysql_use_result(conn); /* output table name */ printf("MySQL Tables in mysql database:
"); while ((row = mysql_fetch_row(res)) != NULL) printf("%s
", row[0]); /* close connection */ mysql_free_result(res); mysql_close(conn); }, I tried with this code but u got mysql.h is not found , you also need to install mysql connector for C/C++, hope this helps you, sorry I tried my best
@@unitedtoptech6288 ok no problem... I think you are sound good in technology... But you are also like others copy paste... Ok leave it... I already have thid code snippet... Thanks for your time and help 🙏🙏
but can't find bluestacks in control panel😔
then u did not install
Hi amir
ur name?