Package of classes that provide DBMS independent access and management of databases.
Currently it features:
o BSD style license.
o Dual API call forms:
* Direct driver class object calls
* Global function calls
o Set of functions that call the selected DBMS driver objects functions supporting when possible:
* Database connection setup with support for connection strings
* Operation error handling
* Query constant data conversion
* Direct queries
* Prepared queries
* Query result rows random access
* Retrieve a limit range of rows of a SELECT query.
* Nested transactions
* Large object fields (BLOBs - storing files in the database)
* Database object creation (tables, indexes, sequences)
* DBMS driver supported feature query
o DBMS Drivers classes that support the most important databases being used on the Web.
o Driver conformance test suite to verify if the driver classes are working and features are properly implemented.
o A parser class that is able to interpret DBMS independent database schemas file defined in a custom XML format supporting the following types of objects:
* Tables with fields of the types: text, integer, boolean, date, time, timestamp, decimal, float, character large objects (CLOBs) and binary large objects (BLOBs), auto-increment.
* Primary keys
* Indexes
* Auto incremented sequences
o A manager class that is able to:
* Install a new database from a schema description interpreted by the parser class.
* Ability to compare a previously installed schema with a new schema and only install the changes without affecting data stored after the previous installation or update.
* Dump database structure and contents in the same XML format handled by the parser allowing for moving data between databases of different DBMS vendors.
* Reverse engineer schemas of already installed databases
DB class for MYSQL, POSTGRES, SQLITE, PHPLIB, ODBC
If you believe that database abstraction is a good think, but you don't want to
join the religous fights about the best one out there, then we have a common
interest.
This abstract wrapper class provides easy and simple class methods to access the
most important db function. It implements the functionality for databases like
MYSQL, POSTGRESQL or SQLITE. It provides a wrapper for PEAR, PHPLIB, ADOdb and
METABASE and enables you to switch between these db abstraction layers with only
changing a single line of code. You gain the possibility to develop similar code
for more than 15 different databases.
Detailed documentation for all the complete interface exists.
A ligtweight interface supports the most common tasks in an easy and efficent
way, such as sending queries and fetching result sets or single variables.
Additional classes provide tools for accessing database data, dumping
information in html tables, exporting db content to CSV-files or as SQL
statements or presenting database content pagewise (e.g. for search results).
/////////////////////////////////////////////////////////////
// Interface of version 1.0:
function Constructor($libraryPath, $dbType, $preferredResType = ASSOCIATIVE_ARRAY)
function connect($host, $db, $user, $password)
function disconnect()
function query($query)
function getNext($resultType = PREDEFINED_VALUE)
function getAll($resultType = PREDEFINED_VALUE)
function getValue()
function getColumn($resultType = PREDEFINED_VALUE)
function execute($query, $resultType = PREDEFINED_VALUE)
function free()
function numRows()
function affectedRows()
function getIdentifier()
function getTables()
function escapeStr()
Version 3 releases are available at http://sourceforge.net/projects/phpsecurityadm
Version 3 now uses Metabase as a database abstraction layer.
Version 2.2.3 is located at this site. phpSecurityAdmin is a PHP application that was designed to be implemented in custom Content Management Systems (CMS). The ease of use allows the CMS programmer to concentrate on creating a quality application without having to waste a lot of time on the security access side of the system. This application can be used for restricting access to web pages based on user names and passwords. The system will allow the client to: manage user accounts and access rights; add, edit, or delete users; change access and connection rights; control basic system parameters such as user name and password lengths and where connections are allowed to be made from; create and manage "user profiles" in order to allow an efficient method of creating multiple users with similar access rights.
Outputs tables with the result of database queries
Class that outputs a table with the data from the result rows of a database query. It features:
- Database independency (works with any DBMS supported by Metabase).
- Splits the display of the result rows in multiple pages of configurable number of rows displaying automatic links to Next, Previous, First, Last, etc.. pages.
- Arbitrary column display display.
- Automatic alignmnent of columns according to their data types.-
- Configurable colors for the table headers and data alternating between even and odd rows.
ActiveDBLib is a PHP class to access MySQL or optionally other databases by using various Database Abstraction Libraries.
Its primary intention is to hide the differences between the different database abstraction Libraries and to provide standard methods for the database connection, query and result operations.
It currently supports the ADODB, the PEAR:DB and the Metabase libraries.
The only requirement to use one of those abstraction libraries is to include the one of your choice in your script. If no database abstraction library is included, the activeDBLib will act as a MySQL wrapper.
activeDBLib can be used in database based projects to provide the possibility of expanding the database type support without depending about which database abstraction library will be used.
This way MySQL, Access (ODBC), PostgreSQL, Oracle and other databases could be accessed by several database abstraction libraries using the same code in your application. You can easily switch databases and database abstraction libraries.
This way, not only the project can be database independent, but also be database abstraction library independent.