PHP MySQL Helper Library

PHP MySQL Helper Library


A PHP 5 library that allows you to easily create and run both simple and advanced MySQL queries in an object-oriented fashion, without using any SQL and without sacrificing functionality. Query types supported include:

  • Select
  • Join
  • Insert
  • Update
  • Delete
  • Create Table
  • Alter Table
  • Rename Table
  • Truncate Table
  • Drop Table

Additional features:

  • Uses prepared statements
  • Automatically cleans values to prevent SQL injection
  • Object-oriented structure makes it easy to extend with custom functionality
  • Code is well-commented and has great documentation:

What people are saying:

“This script is excellent. Simple and amazing for quick and not-so-dirt job.” – internavigare

I’ve just bought it. Playing with it for a while and it’s great, btw, I would love to see the “group by” function as well.
Good luck to your sales  :) – youngguy

That’s great thanks, great script by the way it has been so useful. – dutchboy2382

Requires PHP version 5.1 or higher, with PDO installed.


  • September 24, 2012: Fixed a couple small bugs.
  • June 16, 2012: Fixed small method naming error.
  • June 12, 2012: Added support for SUM(), AVG(), and grouping AND/OR clauses (e.g., (w and x) or (y and z)).


Author Image