C API use to connect C & SQL database

690 views Asked by At

I am trying to use C API to connect my C code to my SQL. I was wondering if anyone has any good beginner resources so I can get up to speed. All I am trying to do is just store data in tables I made in SQL. If it helps I am using MySQL on my Mac. Thank you!

2

There are 2 answers

0
syntagma On BEST ANSWER

You can find a good MySQL tutorial here: MySQL C API programming tutorial

Here is the official documentation:

  1. 20.6.6 C API Function Overview
  2. 20.6.3 Example C API Client Programs
1
Kaizhe Huang On

The link below has some simple example how to use C API to interact with MySQL.

http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html