August 2003
Intermediate to advanced
1104 pages
19h 27m
English
Imagine creating a Web application that uses MySQL and later being asked to make it work with Oracle. All the PHP functions are different, so you'd have to change every one. In addition, as MySQL and Oracle each use slightly different SQL, you will probably have to change most of your queries. One way of coping with this problem is an abstraction layer. This separates your business logic—the rules of your application—from the code that interfaces with the database. A single function calls the right function based on the type of database you need to query.
Perhaps the most popular database abstraction layer is part of PEAR <http://pear.php.net/>. This library also contains code for session management.
Despite ...
Read now
Unlock full access