www.mithril.ca

PHP Code Samples :: Database Abstraction Layer

Web-Based Apps
phpClassifieds Demo
MP3 Database Search
MP3 Search Engine
Search Engine
Mithril Web Mail
Photo Gallery
Code Samples
PHP
    - DB Abstraction Layer
    - Site Usage Tracker
    - MP3 Database Search
    - MP3 Search Engine
    - Search Engine
    - Employee's Section
    - phpClassifieds Demo
PHP-GTK
    - mediaCat-GTK v2.0.8
Visual Basic
more info.....
Links of Interest
php.net
gtk.php-net
OSDN.org
SourceForge.net
Corrado Club of Canada
The Onion
more links...
Personal Info.
About Geoff A. Virgo
View my Resume
Site Statistics
Contact the Sys. Admin
It is sound programming planning and practise to write programs in a series of descending layers.  Written orignally by Frank M. Kromann, this is a series of classes designed to abstract the database transaction layer from a program's main body of code.  Frank was kind enough to share this abstraction layer with me and allow me to post the code here for viewing and download.  While I've added MySQL support, email error debugging, and done some minor code re-writing, the library is for the most part exactly the same as when he sent it to me.  The class centralizes all database functions and allows for database independent code which will make life much easier if I ever decide to port this site to another RDBMS. 

Features:

  • Support for the following databases:
    • FrontBase
    • PostgreSQL
    • Microsoft SQL Server
    • MySQL
    • all databases supported by PHP's Unified ODBC Functions
    • Adabas D
    • IBM DB2
    • iODBC
    • Solid
    • Sybase SQL Anywhere
    • MS Access
  • Designed to provide a common interface for all supported db's
  • Gives the ability to return result rows in an associative array for DB's (Microsoft SQL Server and ODBC) which don't natively support this under PHP
  • Limited amount of sql debugging in the form of emails sent to a designated administrator account.
  • Debugging emails are sent whenever a connection error, database selection error, or sql statement failure occurs.
  • The email debugging requires that mail() support be properly installed on your system.
  • Full API documentation (in the JavaDoc style) is included in the download

The following links will allow you to either view or download the source code.  If you find my script useful, please sign my guestbook or link to my page.

View the script's source codeDownload the script


Page generation: 0.048483 sec