-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Learning PHP Data Objects
By :
In the previous chapter, we had a brief overview of what PDO is, how to connect to your favourite database using PDO, how to issue simple queries and how to handle errors. Now that you are convinced that PDO is a good thing and are thinking of using it actively, we will be delving into all the features it has to offer.
In this chapter, we will look more closely at creating connections to a database using PDO and connection strings (data source names), the PDOStatement class, and how to traverse result sets. We will also create a small library management application, which will allow us to manage a collection of books of your home library. The application will be able to list books and authors as well as add and edit them.
We will start by having a look at connection strings, since without them, we will not be able to connect to any database. We will then create a sample database, on which all the examples in this book will be based.
We will depart...
Change the font size
Change margin width
Change background colour