Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

Chapter 13. DATABASE FUNCTIONS


dBase


DBM-style Database Abstraction................................................................


filePro


Informix


InterBase


mSQL


MySQL


ODBC


Oracle


Postgres


Sybase


PHP offers support for many databases. Open source relational databases are well
represented, as are many commercial products. If native support for a database doesn't
exist, it's likely you may use ODBC with an appropriate driver. Chapter 17, "Database
Integration," discusses strategies for using databases with PHP-powered sites.


Most of the functions in this section rely on an extension module. These may be loaded
either in the php.ini file or the dl function, but most likely are compiled into PHP.
Typically Windows requires use of the first method and other operating systems require
the second.


While this chapter describes the PHP functions that communicate with various systems, it
does not pursue introducing the intricacies of all the systems. I can't possibly include a
full tutorial on SQL within this book. If you have chosen a database for integration with
PHP, I assume you will take the time to learn about that database. I am a big fan of
MySQL and have found the online documentation to be great. Additionally, several
books are available about MySQL.


dBase


The following functions work on dBase files, which typically end with a .dbf extension.
If you are using the precompiled version for Windows, you will need to load the dBase
extension by editing php.ini or using the dl function. The extension is likely called

Free download pdf