PHP Classes

Ultimate MySQL wrapper: MySQL database access wrapper

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 46%Total: 1,232 All time: 3,102 This week: 455Up
Version License PHP version Categories
simplemysqlwrapper 1.4GNU Lesser Genera...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: 38
All time rank: 8032 in Estonia Estonia
Week rank: 164 Up2 in Estonia Estonia Equal

  Files folder image Files (2)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Reuses Unique User Downloads Download Rankings  
 0%1
Total:1,232
This week:0
All time:3,102
This week:455Up
 User Ratings  
 
 All time
Utility:66%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:46%StarStarStar
Rank:3181