📌
Configuration :
Fullfill functions in the ids.c file with your MySQL identifiers.
char* get_host(){
return "";
}
char* get_username(){
return "";
}
char* get_password(){
return "";
}
char* get_database(){
return "";
}
📌
Usage :
You can see an example of the way you should use the API in the main.c file.
You can also directly start the programe or check how to debug it with the start.sh file
#include "sql_api.c"
int main(int argc, char **argv){
/** Connect to MySQL database */
MYSQL *con = connect_sql();
/** Make a query to your MySQL database */
MYSQL_RES *result = query_sql(con, "YOUR STATEMENT");
/** Print your query's results in the console */
print_sql_data(result);
/** Close the MySQL gateway connection */
mysql_free_result(result);
mysql_close(con);
return 0;
}