PHP Classes

Ultimate MySQL wrapper: MySQL database access wrapper

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 46%Total: 1,232 All time: 3,101 This week: 455Up
Version License PHP version Categories
simplemysqlwrapper 1.4GNU Lesser Genera...5.0PHP 5, Databases


This package implements a MySQL database access wrapper.

There are two classes that provide the same functionality to access MySQL databases. One as a regular class and another that provide static functions so it is not necessary to create an object of the class to call it. It can:

- Connect to MySQL database host delayed connections until the first query is run
- Execute queries
- Escape text literal values to use in SQL queries
- Support transactions
- Retrieve query results as a MySQL resource object, regular arrays and associative arrays
- Collapse multiple rows into single level array
- Retrieve the time spent on the last or all queries
- Retrieve the count of rows that were selected or affected by the last or all queries
- Retrieve the identifier of the last inserted row
- Retrieve the count of row found total when SQL_CALC_FOUND_ROWS is used
- Retrieve the names and explanation of tables and fields of a database
- Retrieve the statistics about of all executed queries using the class
- Retrieve large results with iterator class

When used together with and error handler class/function that also logs stacktrace (like my ErrorManager class) you can get full stacktrace for mysql errors since it calls trigger_error on mysql error.

Picture of Indrek Altpere
Name: Indrek Altpere <contact>
Classes: 3 packages by
Country: Estonia Estonia
Age: 38
All time rank: 8022 in Estonia Estonia
Week rank: 233 Up1 in Estonia Estonia Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example example file to poll tablenames and table fields from database
Accessible without login Plain text file Mysql.php Class Main file

 Version Control Reuses Unique User Downloads Download Rankings  
This week:0
All time:3,101
This week:455Up
 User Ratings  
 All time