Database-Specific Functions in PHP

This section presents some basics in three of the more prominent databases that you can use with PHP. This book assumes that you have some experience with databases and PHP (notably MySQL). This information is included as a brief overview and to point out some of the differences between the functions across different databases. The databases are:

  • MySQL

  • PostgreSQL

  • MS SQL (Microsoft)

Chances are good that you will have at least one of these databases available to you (very good since MySQL and PostgreSQL are available for free download).

There are four basic concepts in PHP for dealing with databases:

  1. Connecting to the database server.

  2. Selecting the proper database.

  3. Querying the database to insert, read, or delete ...

Get Advanced PHP for Web Professionals 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.