ABSTRACT

The wildly popular and widely implemented legacy MySQL API, known as the mysql_query() series of functions, exists no more. It is depreciated as of PHP 5.5. PDO, which stands for PHP Database Objects, is one of two database libraries that are to be used with MySQL going forward. Two reasons for moving on from the legacy MySQL API are an object-oriented interface to the database functions, and improved security. The first reason is great; the second is essential. Previously, it took a lot of manual effort to make mysql_query() secure. Even so, something could easily be missed, and often was. The libraries’ widespread use has enabled both great applications and widespread security holes. An automated way to assist with database security problems was needed. PDO is one of the answers (MySQLi being the other), and is the library chosen exclusively for this book.