Paul DuBois - Writing MySQL Programs Using C
Many web developers view development of C programs as a bit of a black art. Development of programs in a compiled language such as C is vastly different from the development of applications in a scripting language. To familiarize more developers with the MySQL C API, we present a three-part series of articles tailored to developers looking to get into C program development with MySQL. This first article is the full chapter from Paul DuBois’ industry-standard work, MySQL, Third Edition, from Pearson Publishers. The second article, from Mark Schoonover, to be published next week, will cover development with the C API using the Eclipse CDT to write a sample program. The third article, also from Mark Schoonover, will go into more depth and expand the example program using more advanced features of the API.
The chapter covers a lot of ground, covering the following topics:
- Starting development with the C API for MySQL
- How to write client programs that communicate with the server over secure connnections using the Secure Sockets Layer (SSL) protocol.
- How to write applications that use libmysqld, the embedded server library.
- How to send multiple statements to the server at once and then process the result sets that come back.
- How to use server-side prepared statements.
And, without further ado, please download Chapter 6 of MySQL, Third Edition, by Paul DuBois (ISBN 0-672-32938-7). Used by permission. Copyright (c) 2008 Pearson Education, Inc. All rights reserved.