PHP Classes

DbSimple: Abstraction to access several SQL databases

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 46%Total: 1,198 All time: 3,154 This week: 448Up
Version License PHP version Categories
dbsimple 2GNU Lesser Genera...4.1Databases


This is an abstraction package to access several types of SQL databases.

Its features:

- Drivers to access MySQL, PostgreSQL and InterBase or FireBird
- Can execute SQL query templates supporting conditional blocks
- Caching of query results
- Place holder query arguments
- Execute operations to select and count total number of resulting rows
- Retrieve query results in different modes: all result rows, one row, one column, one cell, associative array, multidimensional associative array, linked tree, etc.
- Support to watch and debug query errors
- Query logging that includes query results and caller line number
- Support to native prepared queries
- Access to BLOBs

Please note: there is a lot of usage examples at
E.g. MySQL connect:

require_once "DbSimple/Generic.php";
$DB = DbSimple_Generic::connect("mysql://login:password@host/database");
$rows = $DB->select('SELECT * FROM ?_user LIMIT 10');

Always fresh version at

Picture of Dmitry Koterov
Name: Dmitry Koterov <contact>
Classes: 2 packages by
Country: Russian Federation Russian Federation
Age: ???
All time rank: 71122 in Russian Federation Russian Federation
Week rank: 578 Up29 in Russian Federation Russian Federation Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file Generic.php Class Base class
Accessible without login Plain text file Ibase.php Class InterBase/FireBird driver
Accessible without login Plain text file Mysql.php Class Mysql driver
Accessible without login Plain text file Postgresql.php Class Postgresql driver

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,154
This week:448Up
 User Ratings  
 All time