6.1. Introduction

A ubiquitous part of any PHP book is the topic of databases and database interfacing with PHP. This book is no different, simply because most people who write PHP applications want to use a database.

Many good books exist on database design and using databases with PHP. This chapter introduces using MySQL and SQLite from PHP, but focuses primarily on the PHP 5, specific details of database interfacing.

After you finish reading this chapter, you will have learned

  • Some of the strong and weak points of MySQL and SQLite, and which types of applications at which they excel

  • Interfacing with MySQL with the new mysqli extension

  • How to use PHP 5's bundled sqlite extension

  • How to use PEAR DB to write more portable database code

A Note About ...

Get PHP 5 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.