Login   Register  
PHP Classes
elePHPant
Icontem

Ultimate MySQL wrapper: MySQL database access wrapper

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-03-03 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,093 All time: 3,144 This week: 858Up
Version License PHP version Categories  
simplemysqlwrapper 1.3GNU Lesser General Publ...5.0PHP 5, Databases
Description Author  

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: 28
All time rank: 8043 in Estonia Estonia
Week rank: 1846 Down8 in Estonia Estonia Down

  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  
 0%1Total:1,093All time:3,144
 This week:0This week:858Up