Zend - The PHP Company




Abstraction Layers

Add Code


A Simple Database Abstraction Class  

Type: class library
Added by: icemac
Entered: 15/06/2000
Last modified: 06/12/2007
Rating: **** (21 votes)
Views: 19722
An extremely easy, speedy way to deal with a database from a PHP script. Results are read row by row, as you need them - less demand on memory than loading all result rows into a single monster array =P. You can seek back and forth for the result row you want at any time.

Includes an abstract base class, and a subclass to work with a MySQL db. Write your own subclass of CDBAbstract to work with any PHP-supported database software!

Changes in 1.2: (by Michael Howitz)
- added support for: Commit, Rollback, SetAutoCommit
- added subclass for oracle (OCI8) support

Changes in 1.2.1: (by Dirk Howard)
added subclass for Postgresql (pgsql) support


Database Abstract Layer  

Type: class
Added by: arg123
Entered: 26/03/2004
Last modified: 03/12/2003
Rating: - (fewer than 3 votes)
Views: 5432
Oracle Database abstract layer


DbObject 1.0  

Type: class library
Added by: _OvcA_
Entered: 15/01/2001
Last modified: 01/12/2000
Rating: **** (7 votes)
Views: 7440
This is a class i have been working on. The most important things for me where portability and fast but reliable working.
I would very much appriciate any feedback and pointing out any bugs or bad programing decidions.
I allmost forgot: the class was tested with odbc under win2k and mysql under red hat 7.0. It would be nice if someone could test it with ms sql server (the support for it was inplemented just with the reffrence from the php manual).
I'm currently working on postgreSql support, so v1.1 could be expected soon.


db_driver V1.0  

Type: code fragment
Added by: fpapleux
Entered: 05/03/2005
Last modified: 02/12/2008
Rating: - (fewer than 3 votes)
Views: 3647
db_driver is an abstraction layer equiped with table & database creation/alteration.

Makes it real easy to manage your databases.


ezSQL  

Type: application
Added by: jv22
Entered: 21/10/2002
Last modified: 31/10/2007
Rating: **** (5 votes)
Views: 6529
ezSQL is a widget that makes it ridiculously easy for you to use mySQL or Oracle8 database(s) within your PHP scripts (more db's coming soon).


fpatech - dbdriver MySQL abstraction layer class  

Type: class
Added by: fpapleux
Entered: 04/08/2003
Last modified: 09/12/2002
Rating: - (fewer than 3 votes)
Views: 6209
MySQL abstraction layer class. Easy to use. More functions than usual MySQL PHP functions to make it easier to port to another DB server platform.


Modified Simple Database Abstraction Class to Handle MySQL INNDO Transactional Commits and Rollbacks  

Type: class
Added by: devashishb
Entered: 03/01/2006
Last modified: 02/12/2005
Rating: - (fewer than 3 votes)
Views: 4945
Slight changes to Simple Data Abstraction Class by ICEMAC. Changes to handle Commits / Rollbacks in MYSQL transactional tables.


Multidatabase Abstraction Layer  

Type: class
Added by: massimilianowosz
Entered: 20/01/2006
Last modified: 02/12/2005
Rating: - (fewer than 3 votes)
Views: 3294
This DBClass allows a coder not only to easily run SQL queries and catch/log errors in case of failure but also to easily get result data epresented into php arrays or html tables with a built-in pagination control.


MySQL/MSSQL abstraction Layer  

Type: class
Added by: jcostom
Entered: 02/03/2000
Last modified: 08/12/1999
Rating: **** (5 votes)
Views: 11119
I needed a quick way to switch quickly between MySQL and MS SQL Server for applications, so I wrote two classes, that provide a modular, consistent API that can be used for either database. Changing out your DB is as easy as dropping in the proper DB_whatever.php file into the dir that DB.php lives in, then changing the $dbtype var before you require() DB.php


Object Database Abstraction  

Type: class
Added by: simon622
Entered: 11/07/2002
Last modified: 07/12/2001
Rating: - (fewer than 3 votes)
Views: 6327
An object orientated database absraction layer. Meant for use with mySQL. Supports persistant and non persistant connections, error handling and customised logging. Designed to separate application from database logic. Returns all required elements, result resources, rows and field sizes and names.


Oracle Abstract Layer  

Type: class
Added by: fllabombarda
Entered: 17/03/2004
Last modified: 03/12/2003
Rating: - (fewer than 3 votes)
Views: 4488
Abstract Layer class to run with Oracle Database.


PostgreSQL Abstraction Layer  

Type: class
Added by: tmchow
Entered: 01/03/2001
Last modified: 08/12/2000
Rating: **** (5 votes)
Views: 8467
Class that provides an abstraction layer above the PHP PostgreSQL API. This centralizes all the database connection info such as host, port, username and password. Same class can be used to connect to multiple databases, local and remote, on different ports.
In addition to "normal" stuff that you'd expect from a db abstraction layer, it also supports transactions and comprehensive error checking/management.
Revision History: *** see class header for revision history ***


The opposite of mysql_fetch_assoc  

Type: code fragment
Added by: forumjoiner
Entered: 30/08/2006
Last modified: 09/12/2005
Rating: - (fewer than 3 votes)
Views: 3460
mysql_fetch_assoc "converts" one row from the table into an array. mysql_insert_array "converts" an array into one row from the table.



Search



This Category All Categories