This section outlines the creation of a very simple C application for accessing the small database created in the preceding “whirlwind tour” section.

Don’t Try This at Work, Kids

The program in Listing 1.3 makes a very good, tight, small, simple program. It does not make good Software Engineering. There are many things wrong with it, such as the following:

  • Main() is entirely too long.

  • The SHOW statements could be abstracted to a single function, with the only parameter being the string defining it.

  • It does not contain enough comments.

  • The database it is hitting is unsecured.

  • The database name and host name are hardcoded in the routine.

And on and on. My point is, Listing 1.3 is an example for this section of this book. It is not representative ...

Get MySQL Building User Interfaces now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.