PacktLib: Learning PHP Data Objects

Learning PHP Data Objects

Credits

About the Author

About the Reviewers

Preface

Introduction

Using PDO

Summary

Using PHP Data Objects: First Steps

Connection Strings

Designing Our Code

PDO Statements and Result Sets

Retrieving Result Set Metadata

Summary

Error Handling

Sources of Errors

Types of Error Handling in PDO

Defining an Error Handling Function

Creating the Edit Book Page

Creating the Edit Author Page

Securing against Uncaught Exceptions

Summary

Prepared Statements

Prepared Statements

Working with BLOBs

Summary

Handling Rowsets

Retrieving the Number of Rows in a Result Set

Limiting the Number of Rows Returned

Summary

Advanced PDO Usage

Setting and Getting Connection Attributes

MySQL Buffered Queries

Connecting Using the Connection Configuration File and php.ini Setting

Getting the List of Available Drivers

T´╗┐ransactions

Summary

An Advanced Example

Designing the Model

Modifying the Frontend to Use the Model

Advantages of Separating the Model

Further Thoughts

Finishing Up

Introduction to OOP in PHP5

Introduction to OOP in PHP5

Introduction to OOP in PHP5

Introduction to OOP in PHP5

Introduction to OOP in PHP5

Introduction to OOP in PHP5