This appendix describes the application programming interface for writing PHP scripts that use the PDO extension to interface with MySQL. The API consists of a set of classes and methods for communicating with MySQL servers and accessing databases.
The examples in this appendix are only brief code fragments. For complete client scripts and instructions for writing them, see Chapter 9, “Writing MySQL Programs Using PHP.” The manual for PHP itself is available at the PHP Web site, http://www.php.net/.
This appendix refers to PDO constants using the class-constant notation for PHP 5.1 and up (for example,
PDO::FETCH_NUM). For PHP 5.0, use global-constant notation instead (for example,