Good programming--which is to say, programming that yields both efficient code and a profitable life for the programmer--depends on not reinventing the wheel. If someone else has solved the problem you're facing (and someone almost always has), you'd be foolish to waste your energy figuring out your own solution. MySQL Cookbook
presents solutions to scores of problems related to the MySQL database server. Readers stand a good chance of finding a ready-made solution to problems such as querying databases, validating and formatting data, importing and exporting values, and using advanced features like session tracking and transactions. Paul DuBois has done a great job assembling efficient solutions to common database programming problems, and teaches his readers a lot about MySQL and its attendant APIs in the process.
DuBois organizes his cookbook's recipes into sections on the problem, the solution stated simply, and the solution implemented in code and discussed. The implementation and discussion sections are the most valuable, as they contain the command sequences, code listings, and design explanations that can be transferred to outside projects. The main gripe readers will have about MySQL Cookbook is that the author, in his effort to cover the range of MySQL-friendly programming languages, uses different languages in his solutions to various problems. You'll see a Perl solution to one programming challenge (Perl, in fact, is the most frequently used language, followed by PHP), a Python fix for the next, and a Java sample after that. Readers have to hope that they find a solution in the language they're working with, or that they're able to transliterate the one DuBois has provided. It's usually not a big problem. --David Wall
Topics covered: How to make MySQL databases do your bidding--in terms of queries, table manipulation, data formatting, transactions, and Web interfaces--through the database server's command line interfaces and (more importantly) through the MySQL APIs of Perl, PHP, Java, and Python. Particularly excellent coverage deals with formatting dates and times, management of null values, string manipulation, and import/export techniques.
"...MySQL Cookbook tells you exactly how to solve literally hundreds of problems that you are likely to encounter in getting a MySQL database solution up and running." - Computer Trade Shopper, November 2003
This volume offers a problem-and-solution format that offers practical examples for everyday programming dilemmas. For every problem addressed in the book, there's a worked-out solution or "recipe" - short, focused pieces of code that you can insert directly into your applications. But MySQL Cookbook is more than a collection of cut-and-paste code. You also get explanations of how and why thecode works, so you can learn to adapt the techniques to similar situations. The book covers a lot of ground. Solutions for typical MySQL dilemmas range from simple ways to find all records that contain a given string, to more difficult problems, such as finding matching/nonmatching records in two tables. Whether you use MySQL on Unix, Linux, Windows or the Mac OSX platform, the book will show you how to: import data from external sources; export data for use by external programs; access MySQL from your Web server; use scripts with MySQL to read queries from a file; access MySQL from within client programs that use Perl, PHP, Java, Python and other languages; construct queries that solve commonly-occurring questions; and interact with the server.
This learn-as-you-go resource should help users of all levels exploit MySQL more fully. MySQL Cookbook supplies you with an armory of ready-made techniques for specific problems so that, even if you're an experienced MySQL user, you don't have to write everything from scratch.
Über den Autor und weitere Mitwirkende
Paul DuBois is one of the primary contributors to the MySQL Reference Manual, a renowned online manual that has supported MySQL administrators and database developers for years, now available in an attractive paper format from the O'Reilly Community Press. He is also the author of Using csh & tcsh and Software Portability with imake by O'Reilly, as well as MySQL and MySQL and Perl for the Web by New Riders.