In this book, we examine several different programming languages: Python, Java, Perl, PHP, and C. Among these languages, C is by far the most challenging. With the other languages, your primary concern is the formulation of SQL, the passing of that SQL to a function call, and the manipulation of the resulting data. C adds the complex issue of memory management into the mix.
MySQL provides C libraries that enable the creation of MySQL database applications. MySQL’s API is derived heavily from mSQL to take advantage of the many tools that existed only for mSQL in MySQL’s early days. In this chapter, we dive into basic programming with MySQL C’s API.
You can use MySQL’s C API for C++ programming as well. If you are looking for a more object-oriented approach, however, you should leverage the recently developed MYSQL++ API.