ezSQL is an open source PHP database class that I wrote a while back. It’s used on over 100k websites and is the backbone of many open source projects such as WordPress. The class makes it ridiculously easy to use mySQL, Oracle8, SQLite (PHP), within your PHP script. Includes lots of examples making it very easy to understand how to work with databases. ezSQL has excellent debug functions making it lightning-fast to see what’s going on in your SQL code. ezSQL can dramatically decrease development time and in most cases will streamline your code and make things run faster.

Download ezSQL at Github

ezSQL Features

  • ezSQL is a widget that makes it ridiculously easy for you to use PHP-PDO, mySQL, Oracle8, InterBase/FireBird, PostgreSQL, SQLite (PHP), SQLite (C++) or MS-SQL database(s) within your PHP/C++ scripts (more db’s coming soon) – now works with codeigniter!
  • Completely free, no restrictions what-so-ever
  • It is one php file that you include at the top of your script. Then, instead of using standard php database functions listed in the php manual, you use a much smaller (and easier) set of ezSQL functions.
  • It automatically caches query results and allows you to use easy to understand functions to manipulate and extract them without causing extra server overhead
  • It has excellent debug functions making it lightning-fast to see what’s going on in your SQL code
  • Most ezSQL functions can return results as Objects, Associative Arrays, or Numerical Arrays
  • It can dramatically decrease development time and in most cases will streamline your code and make things run faster as well as making it very easy to debug and optimise your database queries.
  • Works with Smarty templating language
  • It is a small class and will not add very much overhead to your website.



Chris Ray – “I have used ezSQL since version 1.04 and have so much confidence in this database class that I use it (with permission from Justin) as the database engine in a commercial product that I have released recently. To see this fast and easy to use database class in action, you could visit the ReviewCast demo at www.reviewcast.com”

Robin Jackson – “Was in the process of learning about SQl and PHP, the going was slow, that is until ezSQl came along and made things a relative snip. In the process of using ezSQL I also found out more about MySQL and PHP and can now write more natively if I so wished. I found the ‘class’ not just a usefull tool but also a fabulous assistant to learning.”

Luke Hendricks – What a great tool! I trimmed dozens of lines of redundant code out of one of my apps using your object. I can’t wait to build one from the ground up using it.

LL Ceder – “The many examples you provided make it really easy for people to start using your classes immediately.”

Will Macdonald – “BRILLIANT work !!! Next time you are in London let me buy you a beer. It just saved me several hours.”

Kevin Danenberg – “Your ezSQL class facilitated the rapid development of this database intensive site (www.blbex.com). There were times when it was so ludicrously simple I had to laugh! Especially considering how rich ezSQL is in features. Nicely done!”

Alan Graham – “Coming from a J2EE/Oracle background, I was a complete newcomer to PHP/MySQL when I discovered ezSQL. Great documentation and an exceptionally simple API made this the clear choice for our systems (www.parallel56.com). I’ve recommended it to numerous others, and they’ve loved it too. You’ve found what you’re looking for, just download it!!!”

Matthew Hellinger – “I’ve been using ezSQL from v1.08 and it has become an indispensable part of my programming arsenal. With ezSQL I get projects done 2-3 times quicker and can tackle much larger projects with ease thanks to the great API. Knowing that these projects can be easily moved to different database systems is an added bonus.”

Jim O’Halloran’s Web Log – “When I first started working with PHP, the lack of a standard database library seemed odd to me. How would I write database independent PHP scripts? But then I discovered ezSQL which wraps up everything nicely for me. Sure, I could have used PEAR DB, or ADOdb, or Metabase or now PEAR MDB? I guess each has their own advantages or disadvantages, but the fact that there is a choice means we can pick the best tool for the job. For what I’m doing right now, thats ezSQL. Why should I use a more bloated DB library when I’m not going to use most of its features?”



Leave a comment