PHP Classes

SlimDb: Access different database types using PDO

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 438 All time: 6,250 This week: 156Up
Version License PHP version Categories
slimdb 1MIT/X Consortium ...5.3PHP 5, Databases, Design Patterns


This package can be used to access different database types using PDO.

The main class can connect to a given database using PDO.

It takes configuration parameters to determine what driver it should call. Drivers are defined as arrays of functions that implement each of the supported driver operations. Currently there are drivers for MySQL and SQLite.

It supports operations like executing arbitrary SQL queries using prepared statements, retrieving results into arrays, get the last inserted table record identifier and get the metadata of a table.

There is a separate class for executing common SQL INSERT, UPDATE, DELETE and SELECT queries from lists of parameters that define tables, fields, field values, conditions, etc..

Another separate class can perform Object-Relational Mapping by storing and retrieving information in database table records mapped to class objects.


Good and simple MySQL wrapper
What MySQL wrapper should I go with?

Picture of marcelo entraigas
Name: marcelo entraigas <contact>
Classes: 7 packages by
Country: Argentina Argentina
Age: 46
All time rank: 5496 in Argentina Argentina
Week rank: 569 Down6 in Argentina Argentina Equal
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Files folder imageSlimDb (6 files)
Accessible without login Plain text file LICENSE Lic. MIT License file
Accessible without login Plain text file Doc. Readme file

  Files folder image Files  /  SlimDb  
File Role Description
  Accessible without login Plain text file Driver_Mysql.php Aux. Driver for MySQL
  Accessible without login Plain text file Driver_Sqlite.php Aux. Driver for Sqlite
  Plain text file ResultSet.php Class Main class (PDO wrapper)
  Plain text file SlimDb.php Class Main class (PDO Statement wrapper)
  Plain text file Table.php Class Class specialized in single table operations
  Plain text file TableRecord.php Class Mini ORM class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,250
This week:156Up