Summary

Today you learned how to use the C API for MySQL. You saw which code libraries to include and tried one method of structuring your code, using make to compile and link your application.

You had an introduction to the datatypes used by the API and learned how to make a connection to a MySQL server. You should now understand how to run queries and check for and report on error conditions. You learned how to process resultsets where they are returned, or, for queries that return no resultset, to determine what effect a query had on your data.

Although this study of the API covered its main functions and usage rather than its every detail, you should have enough knowledge to write powerful database applications using the C API.

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.